ValidationError
Validation failure with a unified structured error API.
Member Functions:
from_pydantic
from_pydantic(error: PydanticValidationError)
Wrap a Pydantic validation error without losing structured details.
| Name | Type | Description |
|---|---|---|
|
|
Original Pydantic validation error to wrap. |
- Returns
-
"ValidationError"— ValidationError with the original structured error details preserved.
from_metadata
from_metadata(
*,
error_type: str,
loc: tuple[str, ...],
message: str,
input_value: Any,
ctx: dict[str, Any] | None = None,
)
Create a structured error for importer-specific metadata validation.
| Name | Type | Description |
|---|---|---|
|
|
Machine-readable validation error type. |
|
|
Location of the invalid value within the input structure. |
|
|
Human-readable validation error message. |
|
|
Original value that failed validation. |
|
|
Optional extra context for error message formatting. |
- Returns
-
"ValidationError"— ValidationError containing a single structured error entry.