eschutho commented on code in PR #26748: URL: https://github.com/apache/superset/pull/26748#discussion_r1462433110
########## superset/sql_parse.py: ########## @@ -287,9 +292,15 @@ def _extract_tables_from_sql(self) -> set[Table]: """ try: statements = parse(self.sql, dialect=self._dialect) - except ParseError: - logger.warning("Unable to parse SQL (%s): %s", self._dialect, self.sql) - return set() + except ParseError as ex: + dialect = self._dialect or "generic" + raise SupersetSecurityException( + SupersetError( + error_type=SupersetErrorType.QUERY_SECURITY_ACCESS_ERROR, + message=__(f"Unable to parse SQL ({dialect}): {self.sql}"), + level=ErrorLevel.ERROR, Review Comment: @betodealmeida is the underlying error a user error or system error? Seems kind of like a user error that the user should try to fix, is that right? -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org