Map ClientBuildException.WellKnownDeserializationException to AuthenticationException.InvalidServerName, so that the error displayed to the user is more explicit. Closes #6368
This commit is contained in:
parent
05c9a82e1b
commit
b2d6e8ccca
2 changed files with 11 additions and 3 deletions
|
|
@ -22,7 +22,10 @@ fun Throwable.mapAuthenticationException(): AuthenticationException {
|
|||
is ClientBuildException.Sdk -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.ServerUnreachable -> AuthenticationException.ServerUnreachable(message)
|
||||
is ClientBuildException.SlidingSync -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.WellKnownDeserializationException -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.WellKnownDeserializationException -> {
|
||||
// Can happen if the .well-known URL has a redirection to an HTML page for instance
|
||||
AuthenticationException.InvalidServerName(message)
|
||||
}
|
||||
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.EventCache -> AuthenticationException.Generic(message)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue