🐛 Fix bug overriding custom HTTPException and RequestValidationError from exception_handlers#1924
Conversation
… be overridden using exception_handlers
Codecov Report
@@ Coverage Diff @@
## master #1924 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 239 240 +1
Lines 7079 7102 +23
=========================================
+ Hits 7079 7102 +23
Continue to review full report at Codecov.
|
|
📝 Docs preview for commit 391fba2 at: https://5f3d6c9962cbd41e7c6cc084--fastapi.netlify.app |
|
This PR solve same issue as #1887 solve, I didn't see it because they point to two different issues related to the same problem. Basically my idea was to reduce the number of calls to Previously there can be 3 calls to this method because in With this bugfix, there will be always only one call to the |
|
Awesome! Great job @uriyyo ! ☕ 🍰 Thanks for pointing to the previous PR. I ended up merging this one as the code was slightly simpler 🤓 This is included in FastAPI |
Fix issue/related to #1440.
A fix is simple, set
HTTPExceptionandRequestValidationErrorexception handlers only in case when they don't set.