Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.7k
Fix empty message about raised exception#1815
Fix empty message about raised exception#1815tiangolo merged 1 commit intofastapi:masterfrommanlix:handling_errors
Conversation
codecovbot commentedJul 30, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #1815 +/- ##========================================== Coverage 100.00% 100.00% ========================================== Files 235 235 Lines 6989 6833 -156 ==========================================- Hits 6989 6833 -156
Continue to review full report at Codecov.
|
📝 Docs preview for commitdf17f57 at:https://5f22e34b127c7c469e7479bd--fastapi.netlify.app |
Kludex left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do we have the same problem on next exception handler (RequestValidationError)?
But nice catch! 🎉
manlix commentedJul 30, 2020
@Kludex No, we don't. Next exception handler is correct: manlix@lab:~$ curl http://localhost:8000/items/incorrect{"detail":[{"loc":["path","item_id"],"msg":"value is not a valid integer","type":"type_error.integer"}]} Output in logs has expected details in plain text: OMG! The client sent invalid data!: 1 validation errorfor Requestpath -> item_id value is not a valid integer (type=type_error.integer)INFO: 127.0.0.1:50902 -"GET /items/incorrect HTTP/1.1" 422 Unprocessable Entity |
Fix for issue in documentation example code#1814