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

feat: set context during rails error report #649

Conversation

roelbondoc
Copy link
Member

This will always set the context from Rails when an error is reported even if it is not handled. This will allow applications to use Rails.error.set_context instead of Honeybadger.context and still see that context in errors in the UI.

It would have been nice if Rails provided an event for when set_context is called so that we can hook into that, but this should be ok for now.

Closes: #648

Before submitting a pull request, please make sure the following is done:

  1. If you've fixed a bug or added code that should be tested, add tests!
  2. Run rake spec in the repository root.
  3. Use a pull request title that conforms to conventional commits.

This will always set the context from Rails when an error is reported
even if it is not handled. This will allow applications to use
`Rails.error.set_context` instead of `Honeybadger.context` and still see
that context in errors in the UI.

It would have been nice if Rails provided an event for when
`set_context` is called so that we can hook into that, but this should
be ok for now.
@roelbondoc roelbondoc merged commit dee37e1 into master Nov 26, 2024
59 checks passed
@roelbondoc roelbondoc deleted the 648-honeybadger-rack-middleware-ignores-rails-error-context-when-creating-notice-for-unhandled-error branch November 26, 2024 18:24
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.

Honeybadger Rack middleware ignores Rails error context when creating notice for unhandled error
2 participants