sadpandajoe commented on code in PR #35969:
URL: https://github.com/apache/superset/pull/35969#discussion_r2501595432


##########
superset-frontend/src/explore/components/controls/ViewQueryModal.tsx:
##########
@@ -87,16 +89,26 @@ const ViewQueryModal: FC<Props> = ({ latestQueryFormData }) 
=> {
 
   return (
     <ViewQueryModalContainer>
-      {result.map((item, index) =>
-        item.query ? (
-          <ViewQuery
-            key={`query-${index}`}
-            datasource={latestQueryFormData.datasource}
-            sql={item.query}
-            language="sql"
-          />
-        ) : null,
-      )}
+      {result.map((item, index) => (
+        <Fragment key={index}>
+          {item.error && (
+            <Alert
+              key={`error-${index}`}
+              type="error"
+              message={item.error}
+              closable={false}
+            />
+          )}
+          {item.query && (
+            <ViewQuery
+              key={`query-${index}`}
+              datasource={latestQueryFormData.datasource}
+              sql={item.query}
+              language={item.language}
+            />
+          )}
+        </Fragment>
+      ))}

Review Comment:
   The result array is static (loaded once from API, never modified)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to