Add a couple more error messages during authentication. (#2497)

* Add copy for error when signing in with refresh tokens enabled.

* Show an error when a server's well-known file is invalid.

* Changelog.

* Fix wrong alert.
This commit is contained in:
Doug
2024-02-27 08:48:21 +00:00
committed by GitHub
parent 2cf427f715
commit 1afde10ce2
12 changed files with 36 additions and 3 deletions
@@ -80,6 +80,9 @@ class AuthenticationServiceProxy: AuthenticationServiceProxyProtocol {
homeserverSubject.send(homeserver)
return .success(())
} catch AuthenticationError.WellKnownDeserializationError(let error) {
MXLog.error("The user entered a server with an invalid well-known file: \(error)")
return .failure(.invalidWellKnown(error))
} catch AuthenticationError.SlidingSyncNotAvailable {
MXLog.info("User entered a homeserver that isn't configured for sliding sync.")
return .failure(.slidingSyncNotAvailable)
@@ -31,6 +31,7 @@ enum AuthenticationServiceError: Error {
case invalidServer
case invalidCredentials
case invalidHomeserverAddress
case invalidWellKnown(String)
case slidingSyncNotAvailable
case accountDeactivated
case failedLoggingIn