You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/06 16:10:08 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #10243: feat: support new errors payload in SQL Lab

etr2460 commented on a change in pull request #10243:
URL: https://github.com/apache/incubator-superset/pull/10243#discussion_r450328623



##########
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:
       Currently it never happens, so i'll default to using `query.errors[0]`. in the future we may have more than 1 error here, but we'll always render the first one for now then




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org