Skip to content

Commit

Permalink
bridgev2/matrix: handle token errors in /versions properly
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 21, 2024
1 parent a95101e commit 7324f6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bridgev2/matrix/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ func (br *Connector) ensureConnection(ctx context.Context) {
br.logInitialRequestError(err, "Failed to register after /versions failed with M_FORBIDDEN")
os.Exit(16)
}
} else if errors.Is(err, mautrix.MUnknownToken) || errors.Is(err, mautrix.MExclusive) {
br.logInitialRequestError(err, "/versions request failed with auth error")
os.Exit(16)
} else {
br.Log.Err(err).Msg("Failed to connect to homeserver, retrying in 10 seconds...")
time.Sleep(10 * time.Second)
Expand Down

0 comments on commit 7324f6e

Please sign in to comment.