Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superset/sql_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _extract_tables_from_sql(self) -> set[Table]:
logger.warning("Unable to parse SQL (%s): %s", self._dialect, self.sql)
raise SupersetSecurityException(
SupersetError(
error_type=SupersetErrorType.QUERY_SECURITY_ACCESS_ERROR,
error_type=SupersetErrorType.INVALID_SQL_ERROR,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The intent here was that we often need to extract tables in order to see if a query can run, but obviously we do for other reasons. Potentially we could add a try/except in the security manager to capture this error and convert it to a security error, but I don't think it's necessary.

message=__(
"You may have an error in your SQL statement. {message}"
).format(message=ex.error.message),
Expand Down
Loading