Skip to content
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

Deliver even when an error raised in the block argument #660

Closed
wants to merge 1 commit into from

Conversation

aki77
Copy link
Contributor

@aki77 aki77 commented Jun 2, 2021

Goal

I would also like to be notified if there is an error in the block argument of the notify method.
This is because the more important the error handling, the more complex the contents of the block argument, and the more likely it is that an error will occur.

@aki77 aki77 changed the title Change to deliver even when an error raised in the block argument Deliver even when an error raised in the block argument Jun 2, 2021
@johnkiely1
Copy link
Member

Hey @aki77,
Thanks for the PR, we will look to review as soon as priorities allow.

@johnkiely1 johnkiely1 added the backlog We hope to fix this feature/bug in the future label Jun 4, 2021
@imjoehaines
Copy link
Contributor

Thanks for the PR @aki77, this is a really useful fix!

I'll merge this in #664 where I've made a change to log a warning instead of adding metadata. This is what we do in other places where we rescue errors from user-supplied functions, e.g. in on_error callbacks:

begin
should_continue = callback.call(report)
rescue StandardError => e
Bugsnag.configuration.warn("Error occurred in on_error callback: '#{e}'")
Bugsnag.configuration.warn("on_error callback stacktrace: #{e.backtrace.inspect}")
end

@aki77
Copy link
Contributor Author

aki77 commented Jun 16, 2021

Thanks!

@mattdyoung mattdyoung removed the backlog We hope to fix this feature/bug in the future label Jun 18, 2021
@imjoehaines imjoehaines mentioned this pull request Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants