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

Fix false 404 in logs when visiting /rack-mini-profiler/requests #453

Merged
merged 1 commit into from Jul 14, 2020

Conversation

OsamaSayegh
Copy link
Collaborator

Fix for #243 (comment).

I tested the /rack-mini-profiler/requests on a brand new Rails app and I noticed an ActionController::RoutingError error printed to the console, but the page actually worked as expected (I got MP badge speed). The backtrace of the error pointed to this line:

status, headers, body = @app.call(env)

What is happening here is we are calling the next middlewares in the stack before we check for path == '/rack-mini-profiler/requests' which causes Rails to print that error because it doesn't recognize our route (rightfully so). The fix is to simply do our check before we call the next middleware in the chain.

@SamSaffron SamSaffron merged commit 47a8a59 into master Jul 14, 2020
@OsamaSayegh OsamaSayegh deleted the false-404-requests-route branch July 14, 2020 06:51
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

2 participants