rusackas commented on code in PR #40585:
URL: https://github.com/apache/superset/pull/40585#discussion_r3337034375


##########
superset/sql/execution/celery_task.py:
##########
@@ -99,9 +100,12 @@ def _handle_query_error(
         query.set_extra_json_key("errors", errors_payload)
 
     db.session.commit()  # pylint: disable=consider-using-transaction
+    logger.exception("Query %s failed: %s", query.id, ex)
     payload.update(
         {"status": query.status.value, "error": msg, "errors": errors_payload}
     )
+    if stacktrace := traceback.format_exc():
+        payload["stacktrace"] = stacktrace

Review Comment:
   Fixed in commit 8b8b0c12e1. `_handle_query_error` in 
`superset/sql/execution/celery_task.py` now gates the `stacktrace` field on 
`app.config.get("SHOW_STACKTRACE")`. Matches the behavior of 
`handle_query_error` in `sql_lab.py` — stacktrace is omitted by default 
(`SHOW_STACKTRACE = False`) and included only when explicitly enabled by 
operators.



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