luizotavio32 commented on code in PR #34763:
URL: https://github.com/apache/superset/pull/34763#discussion_r2316573895


##########
superset/commands/database/uploaders/base.py:
##########
@@ -133,7 +133,8 @@ def _dataframe_to_database(
                 )
             ) from ex
         except Exception as ex:
-            raise DatabaseUploadFailed(exception=ex) from ex
+            message = ex.message if hasattr(ex, "message") and ex.message else 
str(ex)
+            raise DatabaseUploadFailed(message=message, exception=ex) from ex

Review Comment:
   Handling the exception here will help us catch errors raised inside of 
databases code overrides `df_to_sql()` method. It will return a more actionable 
error rather than `Database upload failed`



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