mirror of
https://github.com/apache/superset.git
synced 2026-06-01 21:59:26 +00:00
chore: stop logging "SyntaxError" as exceptions (#21787)
This commit is contained in:
@@ -313,7 +313,6 @@ def execute_sql_statement( # pylint: disable=too-many-arguments,too-many-statem
|
||||
if query.status == QueryStatus.STOPPED:
|
||||
raise SqlLabQueryStoppedException() from ex
|
||||
|
||||
logger.error("Query %d: %s", query.id, type(ex), exc_info=True)
|
||||
logger.debug("Query %d: %s", query.id, ex)
|
||||
raise SqlLabException(db_engine_spec.extract_error_message(ex)) from ex
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@ class ExecuteSqlCommand(BaseCommand):
|
||||
) from ex
|
||||
raise ex
|
||||
except Exception as ex:
|
||||
query_id = query.id if query else None
|
||||
logger.exception("Query %d: %s", query_id, type(ex))
|
||||
raise SqlLabException(self._execution_context, exception=ex) from ex
|
||||
|
||||
def _try_get_existing_query(self) -> Optional[Query]:
|
||||
|
||||
Reference in New Issue
Block a user