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

railtie: insert our Rails middleware before Rails' one #418

Closed
wants to merge 1 commit into from

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented Sep 14, 2015

Fixes #401 (Track 404 with airbrake)

The ActionDispatch::ShowExceptions middleware rescues any exception
returned by the application and renders nice exception pages if the
request is local or if config.consider_all_requests_local is set to
true. If config.action_dispatch.show_exceptions is set to false,
exceptions will be raised regardless.

Changing the order of middleware allows us to rescue the exception
coming from the Rails middleware. Please note that we still ignore some
exceptions
such as ActionController::RoutingError, which we are able
to catch now.

Fixes #401 (Track 404 with airbrake)

> The ActionDispatch::ShowExceptions middleware rescues any exception
> returned by the application and renders nice exception pages if the
> request is local or if config.consider_all_requests_local is set to
> true. If config.action_dispatch.show_exceptions is set to false,
> exceptions will be raised regardless.

Changing the order of middleware allows us to rescue the exception
coming from the Rails middleware. Please note that [we still ignore some
exceptions][1] such as ActionController::RoutingError, which we are able
to catch now.

[1]: https://github.com/airbrake/airbrake/blob/02d29ccde1c46f957c9cf8261835ec7f9386e041/lib/airbrake/configuration.rb#L146
@kyrylo
Copy link
Contributor Author

kyrylo commented Sep 14, 2015

This is broken. Needs more investigation.

@kyrylo kyrylo closed this Sep 17, 2015
@kyrylo kyrylo deleted the 401-track-error-four-o-four branch September 17, 2015 14:55
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.

None yet

1 participant