Skip to content

[Feature]: Provide error details (validation text, path) #899

Open
@tuukkamustonen

Description

@tuukkamustonen

Suggested Behavior

The ValidationError (why is it a dataclass btw?) and it's child classes don't provide any details of:

  • What actually failed (ie. what was the error message, like Failed validating 'oneOf' in schema or Failed validating 'minLength=3)
  • The path which failed (e.g. foo.bar.array[1].some.nested.field)

These details used to be available in previous versions, but now the error text is very plain, just Request body validation error and such.

Why is this needed?

To log the details, for easier debugging/understanding.

Or, maybe even return them to the caller, so they can understand why the API is not accepting their request.

References

No response

Would you like to implement a feature?

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions