Skip to content

Commit

Permalink
Change Sentry log level of coroutine exception handler (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshg authored Nov 16, 2023
1 parent 8a73003 commit fa308ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/src/main/java/com/smileidentity/util/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import com.smileidentity.SmileIDCrashReporting
import com.smileidentity.compose.consent.bvn.BvnOtpVerificationMode
import com.smileidentity.models.BvnVerificationMode
import com.smileidentity.models.SmileIDException
import io.sentry.Breadcrumb
import io.sentry.SentryLevel
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.CoroutineExceptionHandler
import retrofit2.HttpException
Expand Down Expand Up @@ -258,7 +260,10 @@ fun getExceptionHandler(proxy: (Throwable) -> Unit) = CoroutineExceptionHandler
}
} else {
// Unexpected error, report to Sentry
SmileIDCrashReporting.hub.captureException(throwable)
SmileIDCrashReporting.hub.captureException(throwable) {
it.level = SentryLevel.INFO
it.addBreadcrumb(Breadcrumb("Smile ID Coroutine Exception Handler"))
}
throwable
}
proxy(converted)
Expand Down

0 comments on commit fa308ad

Please sign in to comment.