-
Notifications
You must be signed in to change notification settings - Fork 283
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
Generic error handling #875
Comments
@justin808 Can you point to where this is integrating with Raven and Honeybadger? I'm not sure what the rollbar-gem analog is, since I don't know how the existing examples get consumed. |
Sentry, Raven: |
Is this a good workaround: config.custom_data_method = lambda do |_message, exception, _context|
# Need to find the first exception in the cause chain that responds to "to_error_context"
# Normal catch of the React on Rails error is wrapped in ActionView::Template::Error
error = exception
error = error.cause while error && !error.respond_to?(:to_error_context)
if error&.respond_to?(:to_error_context)
{
ror_error_context: error.to_error_context,
}
end
end |
@justin808 Thanks I see now. Yes, that's the most correct way based on what rollbar-gem currently supports. Supporting |
My gem https://github.com/shakacode/react_on_rails supports HoneyBadger and Sentry with this code:
https://github.com/shakacode/react_on_rails/blob/master/lib/react_on_rails/prerender_error.rb#L25
How do I support Rollbar in a similar manner?
Thanks,
Justin
The text was updated successfully, but these errors were encountered: