Commit 27d7384
authored
RescuedExceptionInterceptor: Handle empty configuration (#2428)
Previously, it could happen that `Sentry.configuration` was `nil`.
In this case, calling `rails` would produce a `NoMethodError`.
We fix this issue by using safe navigation.
Furthermore, this commit ensures we use a reasonable default
in case the configuration couldn't be loaded. Since the config
`report_rescued_exceptions` defaults to `true`, we assume
this value here, too.
Fixes #23861 parent e384446 commit 27d7384
File tree
2 files changed
+11
-1
lines changed- sentry-rails/lib/sentry/rails
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
| |||
0 commit comments