diff --git a/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/startup/BugsnagErrorReporter.kt b/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/startup/BugsnagErrorReporter.kt index d2a4e6432..e45e57f2a 100644 --- a/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/startup/BugsnagErrorReporter.kt +++ b/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/startup/BugsnagErrorReporter.kt @@ -1,12 +1,17 @@ package com.flipcash.app.internal.startup import com.bugsnag.android.Bugsnag +import com.bugsnag.android.Severity import com.getcode.utils.ErrorReporter class BugsnagErrorReporter : ErrorReporter { override fun report(error: Throwable, cause: Throwable, isNotifiable: Boolean) { - if (!isNotifiable) return if (!Bugsnag.isStarted()) return - Bugsnag.notify(error) + Bugsnag.notify(error) { event -> + // WARNING = needs active attention (also drives the Slack filter); + // INFO = recorded for reference only, excluded from Slack. + event.severity = if (isNotifiable) Severity.WARNING else Severity.INFO + true + } } }