Commit Graph
1 Commits
Author SHA1 Message Date
Elizabeth ThompsonandClaude Opus 4.8 042d30f5fa fix(explore): catch TemplateError when validating access for query-backed permalinks
A malformed Jinja SQL template on a query-backed datasource makes
security_manager.raise_for_access() raise a raw jinja2 TemplateError via
process_jinja_sql. This propagated unwrapped through check_chart_access in the
explore permalink create/get commands and out of the API handlers, surfacing as
an opaque 500 instead of a proper 4xx.

Wrap the check_chart_access call in both commands to convert TemplateError into
a SupersetTemplateException (422), and handle that exception in the permalink API
post()/get() handlers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-27 16:46:25 +00:00