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

Support Rails 7.1's show exception check #2049

Merged
merged 2 commits into from
May 30, 2023
Merged

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented May 27, 2023

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.

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.
@st0012 st0012 added this to the 5.10.0 milestone May 27, 2023
@st0012 st0012 self-assigned this May 27, 2023
@st0012 st0012 changed the title Update sentry-rails' show_exception check Support Rails 7.1's show exception check May 27, 2023
@codecov
Copy link

codecov bot commented May 27, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: +4.50 🎉

Comparison is base (fea18fe) 78.62% compared to head (c623b6e) 83.13%.

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     
Impacted Files Coverage Δ
...entry-rails/lib/sentry/rails/capture_exceptions.rb 96.77% <85.71%> (-3.23%) ⬇️

... and 17 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@st0012 st0012 requested a review from sl0thentr0py May 27, 2023 09:16
@st0012 st0012 enabled auto-merge (squash) May 27, 2023 09:17
@st0012
Copy link
Collaborator Author

st0012 commented May 30, 2023

👋 @sl0thentr0py we need this to fix CI

@st0012 st0012 merged commit ff2c29c into master May 30, 2023
@st0012 st0012 deleted the update-show-exception-check branch May 30, 2023 10:01
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
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