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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy