mirror of https://github.com/apache/superset.git
chore: stop logging "SyntaxError" as exceptions (#21787)
This commit is contained in:
parent
49b48eeca4
commit
e6c44e02cb
|
@ -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]:
|
||||
|
|
Loading…
Reference in New Issue