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

Return original response in debug middleware patch #461

Merged
merged 1 commit into from
Feb 16, 2016

Conversation

eugeneius
Copy link
Contributor

Fixes #460.

The call to the original render_exception method was moved into an ensure block to prevent errors in this module from interfering with Rails' own error handling behaviour. However an ensure block has no effect on the return value of the method, and we were returning the result of Raven::Rack.capture_exception instead of the response generated by the original Rails middleware.

@eugeneius eugeneius force-pushed the debug_middleware_response branch 2 times, most recently from 51c00c1 to 0bbe600 Compare February 16, 2016 06:35
The call to the original render_exception method was moved into an
ensure block to prevent errors in this module from interfering with
Rails' own error handling behaviour. However an ensure block has no
effect on the return value of the method, and we were returning the
result of Raven::Rack.capture_exception instead of the response
generated by the original Rails middleware.
@nateberkopec
Copy link
Contributor

an ensure block has no effect on the return value of the method

TIL

nateberkopec added a commit that referenced this pull request Feb 16, 2016
Return original response in debug middleware patch
@nateberkopec nateberkopec merged commit 3cdae1d into getsentry:master Feb 16, 2016
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.

2 participants