Handle new EventCache Exception
This commit is contained in:
parent
cedb1fd0da
commit
213dd408f2
2 changed files with 3 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue