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
{{ message }}
Repository navigation
Exceptions inheriting from ValidationError raised in dec_hook implicitly wrapped in another ValidationError post 0.21.0 #1012
I believe the issue is with the logic for how dec_hook errors are handled. According to the docs:
Any TypeError or ValueError exceptions raised by this method will
be considered "user facing" and converted into a ValidationError with
additional context. All other exceptions will be raised directly.
Since ValidationErrors are now also ValueErrors, they will get wrapped again. IMO we should add a guard there, that lets those bubble up unchanged as before, as raising a ValidationError is most likely intentional by the user.
Activity
provinzkraut commentedon Apr 10, 2026
I believe the issue is with the logic for how
dec_hookerrors are handled. According to the docs:Since
ValidationErrors are now alsoValueErrors, they will get wrapped again. IMO we should add a guard there, that lets those bubble up unchanged as before, as raising aValidationErroris most likely intentional by the user.fix wrapping `ValidationError` and `DecodeError` in `ValidationError`…