john-bodley commented on a change in pull request #10274:
URL: 
https://github.com/apache/incubator-superset/pull/10274#discussion_r454039009



##########
File path: superset/exceptions.py
##########
@@ -37,7 +37,19 @@ def exception(self) -> Optional[Exception]:
 
 
 class SupersetTimeoutException(SupersetException):
-    pass
+    status = 408
+
+    def __init__(
+        self,
+        error_type: SupersetErrorType,
+        message: str,
+        level: ErrorLevel,
+        extra: Optional[Dict[str, Any]],
+    ) -> None:
+        super(SupersetTimeoutException, self).__init__(message)
+        self.error = SupersetError(
+            error_type=error_type, message=message, level=level, extra=extra
+        )

Review comment:
       @ktmud could you expand (possibly with an example) on your thoughts? Are 
you looking for more of a generic container for handling error properties?

##########
File path: superset/utils/core.py
##########
@@ -609,15 +610,20 @@ class timeout:  # pylint: disable=invalid-name
     To be used in a ``with`` block and timeout its content.
     """
 
-    def __init__(self, seconds: int = 1, error_message: str = "Timeout") -> 
None:
+    def __init__(self, seconds: int = 1, error_message: str = "Timeout",) -> 
None:

Review comment:
       The extra comma may have come from having a different version of `black`.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to