Skip to main content

InitErrorDetails

This class defines the structure for detailed error information generated during initialization or validation processes. It captures the specific error type, the location of the error within the schema, the problematic input data, and optional context for rendering error messages.

Attributes

AttributeTypeDescription
type`strPydanticCustomError`
loc`tuple[intstr, ...]`
inputAnyThe input data at this loc that caused the error.
ctxdict[str, Any]Values which are required to render the error message, and could hence be useful in rendering custom error messages.

Constructor

Signature

def InitErrorDetails(
type: str | PydanticCustomError,
loc: tuple[int | str, ...],
input: Any,
ctx: dict[str, Any]
) - > null

Parameters

NameTypeDescription
type`strPydanticCustomError`
loc`tuple[intstr, ...]`
inputAnyThe input data at this location that caused the error.
ctxdict[str, Any]Values required to render the error message or pass custom error data forward.