RequestValidationError is **not** a sub-class of Pydantic's ValidationError #10421
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
I was trying to handle both
RequestValidationError
andValidationError
by writing a custom handler forValidationError
but that doesn't work.The docs state that
However, looking at FastAPI source code reveals that this is not the case.
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.101.0
Pydantic Version
2.1.1
Python Version
3.11.3
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions