mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Improve error mapping
This commit is contained in:
+9
-6
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user