mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Fix API break.
This commit is contained in:
+25
-5
@@ -33,13 +33,33 @@ sealed class ErrorType(message: String) : Exception(message) {
|
||||
*/
|
||||
class NotFound(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* The device could not be created.
|
||||
*/
|
||||
class UnableToCreateDevice(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* An unknown error has happened.
|
||||
*/
|
||||
class Unknown(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* The requested device was not returned by the homeserver.
|
||||
*/
|
||||
class DeviceNotFound(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* The other device is already signed in and so does not need to sign in.
|
||||
*/
|
||||
class OtherDeviceAlreadySignedIn(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* The sign in was cancelled.
|
||||
*/
|
||||
class Cancelled(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* The sign in was not completed in the required time.
|
||||
*/
|
||||
class Expired(message: String) : ErrorType(message)
|
||||
|
||||
/**
|
||||
* A secure connection could not have been established between the two devices.
|
||||
*/
|
||||
class ConnectionInsecure(message: String) : ErrorType(message)
|
||||
}
|
||||
|
||||
+5
-1
@@ -15,7 +15,11 @@ internal fun HumanQrGrantLoginException.map() = when (this) {
|
||||
is HumanQrGrantLoginException.InvalidCheckCode -> ErrorType.InvalidCheckCode(message.orEmpty())
|
||||
is HumanQrGrantLoginException.MissingSecretsBackup -> ErrorType.MissingSecretsBackup(message.orEmpty())
|
||||
is HumanQrGrantLoginException.NotFound -> ErrorType.NotFound(message.orEmpty())
|
||||
is HumanQrGrantLoginException.UnableToCreateDevice -> ErrorType.UnableToCreateDevice(message.orEmpty())
|
||||
is HumanQrGrantLoginException.Cancelled -> ErrorType.Cancelled(message.orEmpty())
|
||||
is HumanQrGrantLoginException.ConnectionInsecure -> ErrorType.ConnectionInsecure(message.orEmpty())
|
||||
is HumanQrGrantLoginException.DeviceNotFound -> ErrorType.DeviceNotFound(message.orEmpty())
|
||||
is HumanQrGrantLoginException.Expired -> ErrorType.Expired(message.orEmpty())
|
||||
is HumanQrGrantLoginException.OtherDeviceAlreadySignedIn -> ErrorType.OtherDeviceAlreadySignedIn(message.orEmpty())
|
||||
is HumanQrGrantLoginException.Unknown -> ErrorType.Unknown(message.orEmpty())
|
||||
is HumanQrGrantLoginException.UnsupportedProtocol -> ErrorType.UnsupportedProtocol(message.orEmpty())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user