mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-07-08 15:04:21 +01:00
Improve stacktraces by not wrapping CDS exceptions in RuntimeExceptions.
This commit is contained in:
+2
-2
@@ -123,7 +123,7 @@ object ContactDiscoveryRefreshV2 {
|
||||
}
|
||||
|
||||
is NetworkResult.NetworkError -> throw result.exception
|
||||
is NetworkResult.ApplicationError -> throw RuntimeException("Unexpected exception", result.throwable)
|
||||
is NetworkResult.ApplicationError -> throw result.throwable
|
||||
}
|
||||
|
||||
return response.results[e164]?.let { item ->
|
||||
@@ -213,7 +213,7 @@ object ContactDiscoveryRefreshV2 {
|
||||
}
|
||||
|
||||
is NetworkResult.NetworkError -> throw result.exception
|
||||
is NetworkResult.ApplicationError -> throw RuntimeException("Unexpected exception", result.throwable)
|
||||
is NetworkResult.ApplicationError -> throw result.throwable
|
||||
}
|
||||
|
||||
if (!isPartialRefresh && SignalStore.misc.isCdsBlocked) {
|
||||
|
||||
@@ -72,8 +72,6 @@ class CdsApi(private val authWebSocket: SignalWebSocket.AuthenticatedWebSocket)
|
||||
is TimeoutException -> NetworkResult.NetworkError(IOException("Timed out"))
|
||||
else -> throw e
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
throw RuntimeException("Unexpected exception when retrieving registered users!", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user