dpgaspar commented on code in PR #23025:
URL: https://github.com/apache/superset/pull/23025#discussion_r1099562504


##########
superset/commands/importers/v1/__init__.py:
##########
@@ -67,6 +67,9 @@ def run(self) -> None:
         try:
             self._import(db.session, self._configs, self.overwrite)
             db.session.commit()
+        except CommandException as ex:
+            db.session.rollback()
+            raise ex
         except Exception as ex:
             db.session.rollback()
             raise self.import_error() from ex

Review Comment:
   `from ex` will raise the generic dataset import error with the `ex` message 
on the `__cause__` attr. This cause will not be included on the API error 
message response. 



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