RequestValidationError
This class represents an exception raised when a request fails validation against a defined schema. It captures a sequence of validation errors and optionally stores the request body and endpoint context associated with the failure.
Attributes
| Attribute | Type | Description |
|---|---|---|
| body | Any = None | The original request body that triggered the validation error, used for debugging or reporting the source of the failure. |
Constructor
Signature
def RequestValidationError(
errors: Sequence[Any],
body: Any = None,
endpoint_ctx: EndpointContext | None = None
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| errors | Sequence[Any] | A sequence of validation error details. |
| body | Any = None | The request body that failed validation. |
| endpoint_ctx | `EndpointContext | None` = None |
Signature
def RequestValidationError(
errors: Sequence[Any],
body: Any = None,
endpoint_ctx: EndpointContext | None = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| errors | Sequence[Any] | A sequence of error details or Pydantic error dictionaries describing the specific validation failures. |
| body | Any = None | The raw or partially parsed request body that triggered the validation errors, preserved for debugging or error reporting. |
| endpoint_ctx | `EndpointContext | None` = None |