You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/28 18:43:09 UTC

[GitHub] [superset] pkdotson commented on a diff in pull request #21836: refactor: return initial exception and check if it's user error

pkdotson commented on code in PR #21836:
URL: https://github.com/apache/superset/pull/21836#discussion_r1008349773


##########
superset/sqllab/command.py:
##########
@@ -122,25 +110,7 @@ def run(  # pylint: disable=too-many-statements,useless-suppression
                 "status": status,
                 "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
-            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
-            raise ex
         except Exception as ex:
-            query_id = query.id if query else None
-            logger.exception("Query %d: %s", query_id, type(ex))

Review Comment:
   would it be useful to still log query id here or no?



-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org