bito-code-review[bot] commented on PR #39897:
URL: https://github.com/apache/superset/pull/39897#issuecomment-4383557773
<!-- Bito Reply -->
The flagged issue is correct. Re-raising SupersetErrorException in
get_df_payload breaks async legacy explore jobs, as
load_explore_json_into_cache catches generic exceptions and converts them to
plain strings, losing structured fields like error_type and OAuth2 extras. To
resolve, update load_explore_json_into_cache to handle SupersetErrorException
explicitly, similar to load_chart_data_into_cache. Checked PR comments: none
found.
**superset/tasks/async_queries.py**
```
import dataclasses
from superset.exceptions import SupersetErrorException
# In load_explore_json_into_cache, modify the except Exception block:
try:
# existing code
except Exception as ex:
if isinstance(ex, SupersetErrorException):
errors = [dataclasses.asdict(ex)]
else:
error = ex.message if hasattr(ex, "message") else str(ex)
errors = [error]
async_query_manager.update_job(..., errors=errors)
```
--
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]