eschutho commented on code in PR #25669:
URL: https://github.com/apache/superset/pull/25669#discussion_r1366231857


##########
superset/datasets/commands/create.py:
##########
@@ -49,10 +50,14 @@ def run(self) -> Model:
             # Updates columns and metrics from the dataset
             dataset.fetch_metadata(commit=False)
             db.session.commit()
-        except (SQLAlchemyError, DAOCreateFailedError) as ex:
+        except (SQLAlchemyError, DAOCreateFailedError, 
SupersetSecurityException) as ex:
             logger.warning(ex, exc_info=True)
             db.session.rollback()
-            raise DatasetCreateFailedError() from ex
+            raise DatasetCreateFailedError(
+                *{"message": str(ex)}
+                if isinstance(ex, SupersetSecurityException)

Review Comment:
   ```suggestion
               raise DatasetCreateFailedError() from ex
   ```
   in other words, this should still work.



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