Handle new EventCache Exception
This commit is contained in:
@@ -22,6 +22,7 @@ fun Throwable.mapAuthenticationException(): AuthenticationException {
|
||||
is ClientBuildException.SlidingSync -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.WellKnownDeserializationException -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
|
||||
is ClientBuildException.EventCache -> AuthenticationException.Generic(message)
|
||||
}
|
||||
else -> AuthenticationException.Generic(message)
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ class AuthenticationExceptionMappingTest {
|
||||
.isException<AuthenticationException.Generic>("WellKnown Deserialization")
|
||||
assertThat(ClientBuildException.WellKnownLookupFailed("WellKnown Lookup Failed").mapAuthenticationException())
|
||||
.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) {
|
||||
|
||||
Reference in New Issue
Block a user