Files
superset2/tests
Elizabeth Thompson cfb0c6bd74 fix(errors): map uncaught SupersetException status/log-level correctly (SC-115609)
ChartDataRestApi.data() isn't decorated with @handle_api_exception, so a
correctly-classified QueryObjectValidationError (e.g. from a virtual
dataset's Jinja template indexing into an empty filter_values() list)
propagates uncaught to Flask's global catch-all, which always logs at
ERROR and returns HTTP 500 regardless of the exception's real status.

Add @app.errorhandler(SupersetException) mirroring the existing
handle_api_exception pattern: log level and HTTP status now follow
ex.status via get_logger_from_status, instead of being hardcoded to
ERROR/500. Subclasses with their own specific handler (SupersetErrorException,
SupersetErrorsException, CommandException) are unaffected by Flask's MRO
dispatch. 500-status SupersetException subclasses keep logging at ERROR.

Fixes SUPERSET-PYTHON-12EZ

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-31 15:19:10 +00:00
..