mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat: initial work to make v1 API compatible with SIP-40 and SIP-41 (#13960)
* WIP * Use errorhandler * Add response schema * Fix status on HTTPException * s/found/encountered/g * Fix test * Fix lint * Fix lint and test
This commit is contained in:
@@ -54,6 +54,14 @@ class SupersetErrorException(SupersetException):
|
||||
)
|
||||
|
||||
|
||||
class SupersetErrorsException(SupersetException):
|
||||
"""Exceptions with multiple SupersetErrorType associated with them"""
|
||||
|
||||
def __init__(self, errors: List[SupersetError]) -> None:
|
||||
super().__init__(str(errors))
|
||||
self.errors = errors
|
||||
|
||||
|
||||
class SupersetTimeoutException(SupersetErrorException):
|
||||
status = 408
|
||||
|
||||
@@ -97,13 +105,9 @@ class SupersetSecurityException(SupersetException):
|
||||
self.payload = payload
|
||||
|
||||
|
||||
class SupersetVizException(SupersetException):
|
||||
class SupersetVizException(SupersetErrorsException):
|
||||
status = 400
|
||||
|
||||
def __init__(self, errors: List[SupersetError]) -> None:
|
||||
super().__init__(str(errors))
|
||||
self.errors = errors
|
||||
|
||||
|
||||
class NoDataException(SupersetException):
|
||||
status = 400
|
||||
|
||||
Reference in New Issue
Block a user