Skip to content

Wrap pydantic's validation error #13

@silvanmelchior

Description

@silvanmelchior

If validation of a config class fails, the exception is raised by pydantic and not touched by confz at all. At the same time, confz might raise exceptions if the config could not be loaded or merged in the first place (e.g. a missing config file). Thus, the user has to catch both exceptions to react accordingly.

An alternative would be if confz catches the error of pydantic and raises its own exception, inheriting from ConfZException. This would allow the user to only catch a single exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions