-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to notify with specific severity and have that severity reflected in other OnErrorCallback #1051
Comments
Hi @elihart The ordering of the callbacks is by design. Our thinking is that the primary purpose of callbacks would be to modify the error report, and that the closest callback to the original code should be able to override any callbacks with wider scope. i.e. you should be able to implement a global callback overriding the severity but then override that further in a callback on the specific Can you share more details of your use case so we can consider whether there's another way we could support this better? E.g. how are you reacting to the overridden severity? Is this to modify another aspect of what's sent to Bugsnag? |
This is not to modify anything that is sent to bugsnag. The purpose is to have other, decoupled systems in our infrastructure be able to recognize when a handled error is sent. We have a few uses for this:
While we could have the handled error call site hook into these custom behaviors, it would be much cleaner to rely on other Bugsnag error callbacks so that it can be decoupled. For example, for our instrumentation testing I don't want to make any changes to our production code but instead add a |
Hi @elihart Thanks for the information, that's really helpful. We'll consider what our best options are for improvements here. For example, one possibility would be we could provide a new callback which always runs on the final report sent to Bugsnag. |
Description
If I want to notify a handled issue with Error severity I must use a callback like
However, if there are any other
OnErrorCallback
registered on the Bugsnag client those callbacks will not see this intended severity because theClient#notifyInternal
implementation calls other OnErrorCallback before the callback of thenotify
callAs 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 tonotify
.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 tonotify
can be called before all otherOnErrorCallback
.The text was updated successfully, but these errors were encountered: