ktmud commented on a change in pull request #10274:
URL:
https://github.com/apache/incubator-superset/pull/10274#discussion_r452444624
##########
File path: superset/utils/core.py
##########
@@ -617,7 +618,14 @@ def handle_timeout( # pylint: disable=unused-argument
self, signum: int, frame: Any
) -> None:
logger.error("Process timed out")
- raise SupersetTimeoutException(self.error_message)
+ raise SupersetTimeoutException(
+ SupersetError(
+ error_type=SupersetErrorType.BACKEND_TIMEOUT_ERROR,
+ message=self.error_message,
+ level=ErrorLevel.ERROR,
+ extra={"timeout": self.seconds,},
+ )
Review comment:
Using two classes to initialize things is kind of weird to me. Can you
pass the extras as arguments to `SupersetTimeoutException` and let
`SupersetTimeoutException` enforce the structure for `SupersetError`?
----------------------------------------------------------------
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]