forked from MirrorHub/mautrix-whatsapp
Add better error messages for some setup issues
This commit is contained in:
parent
b50be23dd1
commit
1608bdf612
1 changed files with 4 additions and 1 deletions
5
main.go
5
main.go
|
@ -205,7 +205,10 @@ func (bridge *Bridge) ensureConnection() {
|
|||
resp, err := bridge.Bot.Whoami()
|
||||
if err != nil {
|
||||
if errors.Is(err, mautrix.MUnknownToken) {
|
||||
bridge.Log.Fatalln("Access token invalid. Is the registration installed in your homeserver correctly?")
|
||||
bridge.Log.Fatalln("The as_token was not accepted. Is the registration file installed in your homeserver correctly?")
|
||||
os.Exit(16)
|
||||
} else if errors.Is(err, mautrix.MExclusive) {
|
||||
bridge.Log.Fatalln("The as_token was accepted, but the /register request was not. Are the homeserver domain and username template in the config correct, and do they match the values in the registration?")
|
||||
os.Exit(16)
|
||||
}
|
||||
bridge.Log.Errorfln("Failed to connect to homeserver: %v. Retrying in 10 seconds...", err)
|
||||
|
|
Loading…
Reference in a new issue