Render an error dialog in case registering a pusher fails.

This commit is contained in:
Benoit Marty 2024-06-17 09:48:21 +02:00 committed by Benoit Marty
parent 21ce1c40b3
commit 725c3838af
12 changed files with 131 additions and 9 deletions

View file

@ -20,3 +20,7 @@ sealed class ClientException(message: String) : Exception(message) {
class Generic(message: String) : ClientException(message)
class Other(message: String) : ClientException(message)
}
fun ClientException.isNetworkError(): Boolean {
return this is ClientException.Generic && message?.contains("error sending request for url", ignoreCase = true) == true
}