exception_notification
exception_notification copied to clipboard
New exception to add to ignored_exceptions
Rails 6.1 includes a new exception ActionDispatch::Http::MimeNegotiation::InvalidType (https://github.com/rails/rails/pull/40353) that should be added to list of default ignored exceptions.
This new exception can't be caught in a Rails app via rescue_from as the error occurs too early in the call stack. See the Rails discussion for additional details.
Currently when this exception is caught with the exception_notificaition gem the following is shown in the error report:
-------------------------------
Request:
-------------------------------
ERROR: Failed to generate exception summary:
Additional discussion can be found at https://github.com/rails/rails/issues/37620
This does seem like a good default. I've started including this exception in my apps' config/initializers/exception_notification.rb initializer:
# Ignore additional exception types.
# ActiveRecord::RecordNotFound, AbstractController::ActionNotFound and ActionController::RoutingError
# are already added.
config.ignored_exceptions += %w[
ActionController::InvalidAuthenticityToken
+ ActionDispatch::Http::MimeNegotiation::InvalidType
]
Will this be merged soon and included in the new version of exception_notification gem?