ktmud commented on a change in pull request #10243:
URL:
https://github.com/apache/incubator-superset/pull/10243#discussion_r449850554
##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -214,17 +215,25 @@ export default class ResultSet extends
React.PureComponent<
if (query.state === 'stopped') {
return <Alert bsStyle="warning">Query was stopped</Alert>;
} else if (query.state === 'failed') {
- return (
- <Alert bsStyle="danger">
- {query.errorMessage}
- {query.link && (
- <a href={query.link} target="_blank" rel="noopener noreferrer">
- {' '}
- {t('(Request Access)')}{' '}
- </a>
- )}
- </Alert>
- );
+ if (query.errors) {
+ return (
+ <>
+ {query.errors.map(error => (
+ <ErrorMessageWithStackTrace
+ error={error}
+ message={error.message}
+ />
+ ))}
+ </>
Review comment:
So it seems we may render multiple error messages? Have you tested what
the UI look like with multiple alert boxes stacked on top of each other? If it
never happens, maybe use `query.errors[0]`?
On a separate note, I'm making an API generator that [also handles server
side
errors](https://github.com/apache-superset/superset-ui/pull/666/files#diff-886b8347540bd209fe65965510de85f8),
hopefully it'd be useful to simplify error rendering as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]