mirror of https://github.com/tiangolo/fastapi.git
Add RequestMalformedError exception class
This commit is contained in:
parent
e24b9e9436
commit
a704d7e514
|
|
@ -162,6 +162,12 @@ class ValidationException(Exception):
|
|||
return self._errors
|
||||
|
||||
|
||||
class RequestMalformedError(ValidationException):
|
||||
def __init__(self, errors: Sequence[Any], *, body: Any = None) -> None:
|
||||
super().__init__(errors)
|
||||
self.body = body
|
||||
|
||||
|
||||
class RequestValidationError(ValidationException):
|
||||
def __init__(self, errors: Sequence[Any], *, body: Any = None) -> None:
|
||||
super().__init__(errors)
|
||||
|
|
|
|||
Loading…
Reference in New Issue