feat: update timeout error UX (#10274)

This commit is contained in:
Erik Ritter
2020-07-20 15:32:17 -07:00
committed by GitHub
parent d92cb66f60
commit 5fa4680447
29 changed files with 557 additions and 65 deletions

View File

@@ -18,7 +18,7 @@ from typing import Any, Dict, Optional
from flask_babel import gettext as _
from superset.errors import SupersetError
from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
class SupersetException(Exception):
@@ -37,7 +37,19 @@ class SupersetException(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
)
class SupersetSecurityException(SupersetException):