From e4dcca1807766fd7b6448392cf8f7dd883f4c71d Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Fri, 15 May 2026 13:21:52 -0400 Subject: [PATCH] fix(logging): filter FIS_AUTH_ERROR from Bugsnag reports Firebase Installations Service auth errors are transient and not actionable from the client. Expand isGmsTransientError() to catch FIS_AUTH_ERROR and walk the full cause chain so nested IOExceptions are detected. Signed-off-by: Brandon McAnsh --- .../src/main/kotlin/com/getcode/utils/ErrorUtils.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/logging/src/main/kotlin/com/getcode/utils/ErrorUtils.kt b/libs/logging/src/main/kotlin/com/getcode/utils/ErrorUtils.kt index 11e4af35f..e46b06beb 100644 --- a/libs/logging/src/main/kotlin/com/getcode/utils/ErrorUtils.kt +++ b/libs/logging/src/main/kotlin/com/getcode/utils/ErrorUtils.kt @@ -80,10 +80,11 @@ object ErrorUtils { throwable is UnknownHostException || throwable.cause is UnknownHostException - private fun isGmsTransientError(throwable: Throwable): Boolean { - fun check(t: Throwable?) = t is java.io.IOException && t.message == "SERVICE_NOT_AVAILABLE" - return check(throwable) || check(throwable.cause) - } + private val gmsTransientMessages = setOf("SERVICE_NOT_AVAILABLE", "FIS_AUTH_ERROR") + + private fun isGmsTransientError(throwable: Throwable): Boolean = + generateSequence(throwable) { it.cause } + .any { it is java.io.IOException && it.message in gmsTransientMessages } val ignoredGrpcStatusCodes = setOf( // Transport/transient