Skip to main content

InitErrorDetails

This class defines the structure for detailed error information during initialization, capturing the specific type of error and its location within the schema. It provides access to the original input data that triggered the failure and includes a context dictionary for rendering custom error messages or passing additional metadata.

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 the specified location that caused the error.
ctxdict[str, Any]A dictionary of values required to render the error message or pass custom error data.