Skip to content

Unable to notify with specific severity and have that severity reflected in other OnErrorCallback #1051

Description

@elihart

Description

If I want to notify a handled issue with Error severity I must use a callback like

  Bugsnag.notify(throwable) { event ->
            event.severity = Severity.Error
            true
}

However, if there are any other OnErrorCallback registered on the Bugsnag client those callbacks will not see this intended severity because the Client#notifyInternal implementation calls other OnErrorCallback before the callback of the notify call

if (!callbackState.runOnErrorTasks(event, logger)
                || (onError != null && !onError.onError(event))) {

As far as I can tell this makes it impossible for our other callbacks to see the intended severity, and we can't react to it with any custom code that we may need.

Describe the solution you'd like
Ideally I'd like to see a Severity parameter added to notify.

Describe alternatives you've considered
Since that was removed in the 5.0 upgrade it doesn't seem like you want to provide that, so then maybe the callback order can be switched, so that the OnErrorCallback passed to notify can be called before all other OnErrorCallback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogWe hope to fix this feature/bug in the futurefeature requestRequest for a new feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions