Handling unexpected errors #13
-
|
I want to capture and log unexpected errors. I'm using the default handler which includes the exception handler: The documentation at https://nrwldev.github.io/fastapi-problem/usage/ says: What does this mean wrt to the default handler? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Yeah, I need to make that section clearer. If you want to provide custom exceptions for unhandled errors, then you can provide that configuration. All unexpected errors will get handled regardless of custom wrappers. Those allow you to provide a better 404 message for example. A starlette raised If you provide: Would return the same |
Beta Was this translation helpful? Give feedback.
https://github.com/NRWLDev/fastapi-problem/tree/main/examples
Check out the recently added examples (namely builtin and custom, for hopefully more clarity on what
unhandled_wrappersdoes.)