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

ActionDispatch::Executor: report errors handled by ShowExceptions #51050

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

casperisfine
Copy link
Contributor

Fix: #51002

In the default middleware stack, the ShowExceptions middleware is lower than ActionDispatch::Execturor and will handle most exceptions causing Executor not to witness any.

Instead we need to rely on action_dispatch.exception being added into the request env.

FYI @fractaledmind @rafaelfranca

To be backported to 7.1 and 7.0.

@rails-bot rails-bot bot added the actionpack label Feb 12, 2024
@casperisfine casperisfine force-pushed the show-exception-report-error branch 2 times, most recently from 6f6a48a to 254a4cb Compare February 12, 2024 16:39
Fix: rails#51002

In the default middleware stack, the `ShowExceptions` middleware is
lower than `ActionDispatch::Execturor` and will handle most exceptions
causing `Executor` not to witness any.

Instead we need to rely on `action_dispatch.exception` being added
into the request env.
@byroot byroot merged commit f5910f7 into rails:main Feb 12, 2024
3 of 4 checks passed
@casperisfine casperisfine deleted the show-exception-report-error branch February 12, 2024 16:51
byroot added a commit that referenced this pull request Feb 12, 2024
ActionDispatch::Executor: report errors handled by ShowExceptions
byroot added a commit that referenced this pull request Feb 12, 2024
ActionDispatch::Executor: report errors handled by ShowExceptions
@byroot
Copy link
Member

byroot commented Feb 12, 2024

To be backported to 7.1 and 7.0.

Done.

@holman
Copy link

holman commented Feb 12, 2024

Can confirm this fixes the original issue- thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rails error reporter doesn't report exceptions in production
3 participants