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:50:04 UTC

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

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


##########
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:
   I don't think having the id helps us debug the issue at all tbh, with that information we can't do anything else.
   
   the important thing is that we log the exception here (https://github.com/apache/superset/blob/9edb581f103d3e29b40d1c814cbe935a3d36f486/superset/views/base.py#L202) once it gets bubbled up



-- 
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