mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(sql lab): Syntax errors should return with 422 status (#20491)
* fix(sql lab): Syntax errors should return with 422 status * refactor
This commit is contained in:
@@ -115,6 +115,14 @@ class SupersetErrorsException(SupersetException):
|
||||
self.status = status
|
||||
|
||||
|
||||
class SupersetSyntaxErrorException(SupersetErrorsException):
|
||||
status = 422
|
||||
error_type = SupersetErrorType.SYNTAX_ERROR
|
||||
|
||||
def __init__(self, errors: List[SupersetError]) -> None:
|
||||
super().__init__(errors)
|
||||
|
||||
|
||||
class SupersetTimeoutException(SupersetErrorFromParamsException):
|
||||
status = 408
|
||||
|
||||
|
||||
Reference in New Issue
Block a user