diff --git a/superset/sql_parse.py b/superset/sql_parse.py index c8836f167053..b253ab29d00d 100644 --- a/superset/sql_parse.py +++ b/superset/sql_parse.py @@ -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, message=__( "You may have an error in your SQL statement. {message}" ).format(message=ex.error.message),