-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
style(sqllab): make database errors more clear and render as monospace #11075
style(sqllab): make database errors more clear and render as monospace #11075
Conversation
@rusackas, addressed your comment! |
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.
Instead of passing through a prop to render the subtitle as monospace, why not wrap the subtitle in the ResultSet
component and then pass it through? it's defined as a ReactNode
in ErrorAlert
, so you could change the typing in ErrorMessageWithStackTrace
and avoid passing down the other prop. It would also help keep these error components more generic
1fcde95
to
70d71d7
Compare
@etr2460 I used your approach, thanks for the suggestion! |
In SQL Lab, when a database error message is returned, generally because of a user error in the SQL, it's identified as an "Unexpected Error" and some of the text formatting of the error message (\n, spaces, tabs, ...) are lost as they are rendered in html. This PR identifies the error as a "Database Error", and renders like more like a <pre>, using a monospace font.
70d71d7
to
bd64825
Compare
Codecov Report
@@ Coverage Diff @@
## master #11075 +/- ##
==========================================
- Coverage 65.73% 65.72% -0.01%
==========================================
Files 819 819
Lines 38865 38868 +3
Branches 3669 3670 +1
==========================================
Hits 25546 25546
- Misses 13209 13212 +3
Partials 110 110
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 with a couple more nits to fix
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
Show resolved
Hide resolved
apache#11075) * style(sqllab): make database errors more clear and render as monospace In SQL Lab, when a database error message is returned, generally because of a user error in the SQL, it's identified as an "Unexpected Error" and some of the text formatting of the error message (\n, spaces, tabs, ...) are lost as they are rendered in html. This PR identifies the error as a "Database Error", and renders like more like a <pre>, using a monospace font. * fix the build * addressing comments * addressed comments * lint + removing cruft * addressing comments
In SQL Lab, when a database error message is returned, generally because
of a user error in the SQL, it's identified as an "Unexpected Error" and
some of the text formatting of the error message (\n, spaces, tabs, ...)
are lost as they are rendered in html.
This PR identifies the error as a "Database Error", and renders like
more like a