You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently validators seem to raise a plethora of exceptions of different types and often don't prove much structured info regarding the error.
When a validation exception is raised, I'd expect to be able to determine,
data class type
data class instance
attribute (and/or path?)
validiator instance/function
value
reason for the validation failure or caused by exception
So I can provide useful and structured validation errors to clients of my library/application.
This is partially covered with cattrs and the ClassValidationError exception (and related classes) perhaps porting those exceptions from cattrs or attrs would be a good start?
.
The text was updated successfully, but these errors were encountered:
This is specifically what cattrs is for. With attrs we try to provide you with a toolkit that builds classes as close to what you'd write yourself and leave automation on top of our hooks and metadata to other packages – most famously cattrs. Some older bits and pieces are arguably past that line, but we're trying to keep the two planes separate.
Uh oh!
There was an error while loading. Please reload this page.
Currently validators seem to raise a plethora of exceptions of different types and often don't prove much structured info regarding the error.
When a validation exception is raised, I'd expect to be able to determine,
So I can provide useful and structured validation errors to clients of my library/application.
This is partially covered with cattrs and the ClassValidationError exception (and related classes) perhaps porting those exceptions from cattrs or attrs would be a good start?
.
The text was updated successfully, but these errors were encountered: