-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
fix: Ensure DatabaseErrorMessage works when extra is undefined #15848
fix: Ensure DatabaseErrorMessage works when extra is undefined #15848
Conversation
@@ -189,7 +197,6 @@ def __init__(self, message: str = "Request payload has incorrect format"): | |||
message=message, | |||
error_type=SupersetErrorType.INVALID_PAYLOAD_FORMAT_ERROR, | |||
level=ErrorLevel.ERROR, | |||
extra={}, |
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.
Clean up.
93d7469
to
b561a23
Compare
Codecov Report
@@ Coverage Diff @@
## master #15848 +/- ##
==========================================
- Coverage 77.04% 76.89% -0.16%
==========================================
Files 984 984
Lines 51787 51793 +6
Branches 7028 7028
==========================================
- Hits 39901 39827 -74
- Misses 11661 11741 +80
Partials 225 225
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
lgtm, thanks for the fix
Co-authored-by: John Bodley <john.bodley@airbnb.com> (cherry picked from commit 4ba1709)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
SUMMARY
At Airbnb we have custom error types and thus
SupersetError.extra
field may be undefined (or underdefined) per here whereas the DatabaseErrorMessage expects it to be well defined. This resulted in the application crashing when a custom error was thrown.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION