This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 5.0
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/5.0 by this push:
     new 31098dee40 fix: Matching errorType on superset api error with 
SupersetError (#34261)
31098dee40 is described below

commit 31098dee40547be5142589c64b65962b362a0921
Author: JUST.in DO IT <[email protected]>
AuthorDate: Tue Jul 22 11:51:42 2025 -0700

    fix: Matching errorType on superset api error with SupersetError (#34261)
    
    (cherry picked from commit 229d92590a4e17d97b7fa339e09d1614d3c36c77)
---
 .../ErrorMessage/ErrorMessageWithStackTrace.tsx       |  3 ++-
 .../components/controls/DatasourceControl/index.jsx   | 19 +++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx 
b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
index b993927a7c..dd4d5ed332 100644
--- 
a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
+++ 
b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
@@ -53,7 +53,8 @@ export default function ErrorMessageWithStackTrace({
   // Check if a custom error message component was registered for this message
   if (error) {
     const ErrorMessageComponent = getErrorMessageComponentRegistry().get(
-      error.error_type,
+      // @ts-ignore: plan to modify this part so that all errors in Superset 
6.0 are standardized as Superset API error types
+      error.errorType ?? error.error_type,
     );
     if (ErrorMessageComponent) {
       return (
diff --git 
a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx 
b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
index 80dc4e9c44..41eb24c157 100644
--- 
a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
+++ 
b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
@@ -82,6 +82,7 @@ const Styles = styled.div`
   }
   .error-alert {
     margin: ${({ theme }) => 2 * theme.gridUnit}px;
+    min-height: 150px;
   }
   .ant-dropdown-trigger {
     margin-left: ${({ theme }) => 2 * theme.gridUnit}px;
@@ -441,16 +442,14 @@ class DatasourceControl extends PureComponent {
         {isMissingDatasource && !isMissingParams && (
           <div className="error-alert">
             {extra?.error ? (
-              <div className="error-alert">
-                <ErrorMessageWithStackTrace
-                  title={extra.error.statusText || extra.error.message}
-                  subtitle={
-                    extra.error.statusText ? extra.error.message : undefined
-                  }
-                  error={extra.error}
-                  source="explore"
-                />
-              </div>
+              <ErrorMessageWithStackTrace
+                title={extra.error.statusText || extra.error.message}
+                subtitle={
+                  extra.error.statusText ? extra.error.message : undefined
+                }
+                error={extra.error}
+                source="explore"
+              />
             ) : (
               <ErrorAlert
                 level="warning"

Reply via email to