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

Patch ActionDispatch::DebugExceptions to capture NotFound exceptions #252

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wjordan
Copy link

@wjordan wjordan commented Aug 11, 2018

This PR patches ActionDispatch::DebugExceptions to capture those pesky hard-coded ActionController::RoutingError exceptions generated by non-route-matching X-Cascade == 'pass' responses, re-publishing them to the ActiveSupport::Notifications bus where they are cleanly logged by Lograge, instead of automatically writing a full exception backtrace directly to the Rails log.

Fixes #27, #142.

No tests yet other than running manually in my project- could use guidance on the best way to cover this.

publish errors to Notifications instead of logging the full backtrace directly.
@iloveitaly
Copy link
Collaborator

@wjordan this looks like a great change! Can you rebase on master so the latest CI will run?

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.

lograge doesn't handle 500 or 404 responses
2 participants