This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch ret-ex
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 64e502a726f631755d6b76217fb78c5f3df9c56a
Author: hughhhh <[email protected]>
AuthorDate: Mon Oct 17 14:14:23 2022 -0400

    if user isnt client log exception
---
 superset/sqllab/command.py | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/superset/sqllab/command.py b/superset/sqllab/command.py
index a8ee3c0934..d3d7a04f3e 100644
--- a/superset/sqllab/command.py
+++ b/superset/sqllab/command.py
@@ -123,20 +123,14 @@ class ExecuteSqlCommand(BaseCommand):
                 "payload": 
self._execution_context_convertor.serialize_payload(),
             }
         except SupersetErrorsException as ex:
-            if all(ex.error_type in USER_CLIENT_ERRORS for ex in ex.errors):
-                raise SupersetSyntaxErrorException(ex.errors) from ex
+            if not all(ex.error_type in USER_CLIENT_ERRORS for ex in 
ex.errors):
+                query_id = query.id if query else None
+                logger.exception("Query %d: %s", query_id, type(ex))
             raise ex
         except SupersetException as ex:
-            if ex.error_type in USER_CLIENT_ERRORS:
-                raise SupersetSyntaxErrorException(
-                    [
-                        SupersetError(
-                            message=ex.message,
-                            error_type=ex.error_type,
-                            level=ErrorLevel.ERROR,
-                        )
-                    ]
-                ) from ex
+            if not ex.error_type in USER_CLIENT_ERRORS:
+                query_id = query.id if query else None
+                logger.exception("Query %d: %s", query_id, type(ex))
             raise ex
         except Exception as ex:
             query_id = query.id if query else None

Reply via email to