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:
Diego Medina
2022-07-27 15:41:17 -03:00
committed by GitHub
parent 8b354b4b69
commit 383313b105
2 changed files with 30 additions and 3 deletions

View File

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