diff --git a/superset/sqllab/command.py b/superset/sqllab/command.py index e6319c2c7707a..2a02b854aa26a 100644 --- a/superset/sqllab/command.py +++ b/superset/sqllab/command.py @@ -115,13 +115,9 @@ def run( # pylint: disable=too-many-statements,useless-suppression "payload": self._execution_context_convertor.serialize_payload(), } except (SupersetErrorsException, SupersetException) as ex: - if ex.status != 422: - query_id = query.id if query else -1 - logger.exception("Query %d: %s", query_id, type(ex)) + logger.warning("ExecuteSqlCommand failed with %s", str(ex)) raise ex except Exception as ex: - query_id = query.id if query else -1 - 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]: diff --git a/tests/integration_tests/celery_tests.py b/tests/integration_tests/celery_tests.py index c8a1f9d0ca70c..f057d3128e574 100644 --- a/tests/integration_tests/celery_tests.py +++ b/tests/integration_tests/celery_tests.py @@ -148,7 +148,6 @@ def test_run_sync_query_dont_exist(test_client, ctas_method): engine_name = examples_db.db_engine_spec.engine_name sql_dont_exist = "SELECT name FROM table_dont_exist" result = run_sql(test_client, sql_dont_exist, cta=True, ctas_method=ctas_method) - print(result) if backend() == "sqlite" and ctas_method == CtasMethod.VIEW: assert QueryStatus.SUCCESS == result["status"], result elif backend() == "presto":