john-bodley commented on code in PR #27644:
URL: https://github.com/apache/superset/pull/27644#discussion_r1539766395
##########
superset/models/sql_lab.py:
##########
@@ -76,7 +77,7 @@ def sql_tables(self) -> list[Table]:
self.database.db_engine_spec.engine, # type: ignore
)
)
- except SupersetSecurityException:
+ except (SupersetSecurityException, TemplateError):
Review Comment:
@michael-s-molina per a code search the
[caller](https://github.com/apache/superset/blob/ce210eebdeeb374611e5b273379a889244f64288/superset/queries/saved_queries/api.py#L100)
is the Flask-AppBuilder API and AFAIK that logic is all somewhat magical,
i.e., I'm not sure if/how model errors are handled and it seems like the
various API endpoints are using the
[@safe](https://flask-appbuilder.readthedocs.io/en/v3.2.0/rest_api.html?highlight=exceptions#rest-api)
decorator. Given that, this was the highest point in the stack where I felt
the error should be handled.
--
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]