We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4da83d9 + e4dcca1 commit c551f51Copy full SHA for c551f51
1 file changed
libs/logging/src/main/kotlin/com/getcode/utils/ErrorUtils.kt
@@ -80,10 +80,11 @@ object ErrorUtils {
80
throwable is UnknownHostException ||
81
throwable.cause is UnknownHostException
82
83
- private fun isGmsTransientError(throwable: Throwable): Boolean {
84
- fun check(t: Throwable?) = t is java.io.IOException && t.message == "SERVICE_NOT_AVAILABLE"
85
- return check(throwable) || check(throwable.cause)
86
- }
+ private val gmsTransientMessages = setOf("SERVICE_NOT_AVAILABLE", "FIS_AUTH_ERROR")
+
+ private fun isGmsTransientError(throwable: Throwable): Boolean =
+ generateSequence(throwable) { it.cause }
87
+ .any { it is java.io.IOException && it.message in gmsTransientMessages }
88
89
val ignoredGrpcStatusCodes = setOf(
90
// Transport/transient
0 commit comments