mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Handle new EventCache Exception
This commit is contained in:
+1
@@ -22,6 +22,7 @@ fun Throwable.mapAuthenticationException(): AuthenticationException {
|
|||||||
is ClientBuildException.SlidingSync -> AuthenticationException.Generic(message)
|
is ClientBuildException.SlidingSync -> AuthenticationException.Generic(message)
|
||||||
is ClientBuildException.WellKnownDeserializationException -> AuthenticationException.Generic(message)
|
is ClientBuildException.WellKnownDeserializationException -> AuthenticationException.Generic(message)
|
||||||
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
|
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
|
||||||
|
is ClientBuildException.EventCache -> AuthenticationException.Generic(message)
|
||||||
}
|
}
|
||||||
else -> AuthenticationException.Generic(message)
|
else -> AuthenticationException.Generic(message)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -52,6 +52,8 @@ class AuthenticationExceptionMappingTest {
|
|||||||
.isException<AuthenticationException.Generic>("WellKnown Deserialization")
|
.isException<AuthenticationException.Generic>("WellKnown Deserialization")
|
||||||
assertThat(ClientBuildException.WellKnownLookupFailed("WellKnown Lookup Failed").mapAuthenticationException())
|
assertThat(ClientBuildException.WellKnownLookupFailed("WellKnown Lookup Failed").mapAuthenticationException())
|
||||||
.isException<AuthenticationException.Generic>("WellKnown Lookup Failed")
|
.isException<AuthenticationException.Generic>("WellKnown Lookup Failed")
|
||||||
|
assertThat(ClientBuildException.EventCache("EventCache error").mapAuthenticationException())
|
||||||
|
.isException<AuthenticationException.Generic>("EventCache error")
|
||||||
}
|
}
|
||||||
|
|
||||||
private inline fun <reified T> ThrowableSubject.isException(message: String) {
|
private inline fun <reified T> ThrowableSubject.isException(message: String) {
|
||||||
|
|||||||
Reference in New Issue
Block a user