Handle new EventCache Exception

This commit is contained in:
Benoit Marty
2024-12-11 09:57:45 +01:00
parent 6969e84e50
commit 70b9e433af
2 changed files with 3 additions and 0 deletions

View File

@@ -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)
}

View File

@@ -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) {