eschutho opened a new pull request, #43081:
URL: https://github.com/apache/superset/pull/43081

   ### Summary
   `ChartDataRestApi._get_data_response()` catches `ChartDataCacheLoadError` 
and `ChartDataQueryFailedError` but leaves `QueryObjectValidationError` 
unhandled. When this exception escapes `command.execute()` through paths 
outside `get_df_payload_result()`'s try/except — such as 
`ensure_totals_available()`, the invalid-result-type check in 
`get_query_results_with_timing()`, or preparers like 
`_prepare_drill_detail_query()` — Flask's global handler returns HTTP 500 
instead of 400.
   
   `QueryObjectValidationError` is already imported in this file and has 
`status = 400`. This PR adds the missing except clause, consistent with the 
equivalent handler in the command-setup block above.
   
   ### Testing
   - `pytest tests/unit_tests/charts/data/test_api.py`
   - `pytest tests/integration_tests/charts/charts_test.py`
   
   Tracking: sc-117145


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