Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore ActionDispatch::Http::MimeNegotiation::InvalidType
This expcetion was added between Rails 5.2 and 6.0 [1] in #35604 [2] and #40353. Under Rails 6, in development a 406 HTTP status is returned: > curl -I -H "Content-Type: *" http://localhost:3000 HTTP/1.1 406 Not Acceptable In production, we also get a 406: > curl -I -H "Content-Type: *" https://www.whatdotheyknow.com/cy/request/merthy_road_whitchurch_cardiff HTTP/2 406 This appears to be the correct behaviour and in the PRs above the Rails core team suggest ignoring these exceptions [4]. > You're right that it's not something you can fix which is why we > suggest ignoring it for exception monitoring services like Appsignal, > Sentry and Bugsnag but it's still logged so you can go back and > analyse things if necessary. Fixes #6553. Hat tip to @gbp for the investigation and explanation included in this commit message. [1] https://github.com/rails/rails/blob/1b5658b562b29f8aab7e80cbab8adbd2ddea5447/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L15 [2] rails/rails#35604 [3] rails/rails#40353 [4] rails/rails#35604 (comment)
- Loading branch information