Browse Source
Add RequestMalformedError exception class
pull/14400/head
Javier Sánchez Castro
7 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
0 deletions
-
fastapi/exceptions.py
|
|
|
@ -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) |
|
|
|
|