Support Rails 7.1's show exception check#2049
Merged
Conversation
The `request.show_exceptions?` method will be removed in Raiils 7.1 PR: rails/rails#45867 So this commit adopts the new API to check whether to show exception if the Rails version is 7.1 or later.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2049 +/- ##
==========================================
+ Coverage 78.62% 83.13% +4.50%
==========================================
Files 114 119 +5
Lines 5268 5650 +382
==========================================
+ Hits 4142 4697 +555
+ Misses 1126 953 -173
☔ View full report in Codecov by Sentry. |
Contributor
Author
|
👋 @sl0thentr0py we need this to fix CI |
sl0thentr0py
approved these changes
May 30, 2023
chrisroos
added a commit
to RaspberryPiFoundation/editor-api
that referenced
this pull request
Jun 14, 2024
I was seeing the following error when trying to write a test around the
admin functionality in editor-api:
NoMethodError:
undefined method show_exceptions?' for #<ActionDispatch::Request POST
"http://www.example.com/amin/projects" for 127.0.0.1>
It looks as though this was fixed in Sentry in PR 2049[1] and released
in version 5.10.0[2].
The sentry-rails version constraint was added in
8d2ca2a but there was no explanation
for it so I've assumed it's not necessary.
[1]: getsentry/sentry-ruby#2049
[2]: https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md#5100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
request.show_exceptions?method will be removed in Raiils 7.1 (rails/rails#45867)So this PR adopts the new API to check whether to show exception if the Rails version is 7.1 or later.