Skip to content

add loc and file_position to PydanticValueError #187

@samuelcolvin

Description

@samuelcolvin

More changes after #185.

Also, pydantic/pydantic#4254.

We should add loc to PydanticValueError which gets appended to the error loc

Also add file_position (tuple[int, int] of (line, col)), one day when we have a custom JSON parser we can populate this in pydantic-core, until then we just add it via PydanticValueError.

file_position will require some pretty output in error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions