Improve error mapping
This commit is contained in:
parent
b61ce1b19c
commit
e12726f405
6 changed files with 16 additions and 24 deletions
|
|
@ -7,10 +7,13 @@
|
|||
|
||||
package io.element.android.libraries.matrix.api.auth
|
||||
|
||||
sealed class AuthenticationException(message: String) : Exception(message) {
|
||||
class AccountAlreadyLoggedIn(userId: String) : AuthenticationException(userId)
|
||||
class InvalidServerName(message: String) : AuthenticationException(message)
|
||||
class SlidingSyncVersion(message: String) : AuthenticationException(message)
|
||||
class Oidc(message: String) : AuthenticationException(message)
|
||||
class Generic(message: String) : AuthenticationException(message)
|
||||
sealed class AuthenticationException(message: String?) : Exception(message) {
|
||||
data class AccountAlreadyLoggedIn(
|
||||
val userId: String,
|
||||
) : AuthenticationException(null)
|
||||
|
||||
class InvalidServerName(message: String?) : AuthenticationException(message)
|
||||
class SlidingSyncVersion(message: String?) : AuthenticationException(message)
|
||||
class Oidc(message: String?) : AuthenticationException(message)
|
||||
class Generic(message: String?) : AuthenticationException(message)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue