villebro commented on code in PR #43473:
URL: https://github.com/apache/superset/pull/43473#discussion_r3846015501


##########
superset/utils/decorators.py:
##########
@@ -238,6 +243,11 @@ def on_error(
             logger.exception(ex.exception)
 
         if reraise:
+            if preserve_message:
+                # Prefer the DBAPI cause (e.g. sqlite3's "database is locked") 
over
+                # SQLAlchemy's wrapper, which appends the offending SQL.
+                cause = getattr(ex, "orig", None) or ex
+                raise reraise(str(cause), ex) from ex

Review Comment:
   Good catch — fixed in e63a05f2bd by **removing the `preserve_message` path 
entirely**. Task create/update now reraise the generic `TaskCreateFailedError` 
/ `TaskUpdateFailedError` to the client; the detailed DBAPI cause stays 
server-side (Celery task traceback / request log), which is exactly the 
sanitized-external / detailed-in-logs split you recommend.
   
   Context: `preserve_message` was added to surface SQLite's "database is 
locked" during local dev. We've since moved local dev to Postgres and reverted 
the SQLite-lock workarounds, so its motivation is gone — dropping it is the 
right call on both counts.



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