bugsnag / bugsnag-ruby

BugSnag error monitoring & reporting software for rails, sinatra, rack and ruby
https://docs.bugsnag.com/platforms/ruby
MIT License
246 stars 174 forks source link

Rails `ActionController::RoutingError` Not Being Reported As Default #820

Open berniechiu opened 4 months ago

berniechiu commented 4 months ago

Describe the bug

Rails ActionController::RoutingError not being reported, others look normal as expected.

Environment

Example code snippet

Bugsnag.configuration.ignore_classes
# => #<Set: {SystemExit, SignalException}>
Error messages: ``` # Server Logs # ActionController::RoutingError (No route matches [GET] "/storefront/ba_tracking.js-1234567.map" ``` Screen Shot 2024-03-26 at 3 31 49 PM
mclack commented 3 months ago

Hi @berniechiu

Thanks for your patience here.

In Rails, we capture errors as they are raised through the Rack server. If a request raises an error, we capture and notify it. After looking into this, it appears ActionController::RoutingError is not actually being raised through Rack. It's instead responding with the error page and not raising an error, presumably to keep the application running as it hasn't entered a failure state (which 4xx errors traditionally aren't).

We have now added a task to our backlog to look into changing this, so that these errors are able to be automatically reported. I can't currently give an ETA on when this could be implemented, but if you explicitly raise a RoutingError in the meantime, it should be caught and notified.

We'll make sure to update this thread with any developments around automatic reporting for these errors.

berniechiu commented 3 months ago

Thanks a lot