-
Notifications
You must be signed in to change notification settings - Fork 41
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
[SVLS-4690] Handling panic case #166
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
- Coverage 80.55% 80.43% -0.12%
==========================================
Files 13 13
Lines 905 910 +5
==========================================
+ Hits 729 732 +3
- Misses 145 146 +1
- Partials 31 32 +1 ☔ View full report in Codecov by Sentry. |
if r := recover(); r != nil { | ||
response = nil | ||
errResponse = fmt.Errorf("Panic: %v", r) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned that since we do not re-panic, we're actually changing how a panicking function functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh, I have the very same concern.
I think the alternative would be to re-panic after we send the trace.
defer func() {
if r := recover(); r != nil {
// send the trace somehow
panic(r)
}
}()
What does this PR do?
Motivation
Fix #165
Testing Guidelines
Added unittest.
Also manually tested:
Additional Notes
Types of changes
Checklist