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
I think it would be great if we could have an exception_handlers.py file to handle the mappings from the exceptions to the corresponding error responses.
Eg:
Yeah, I was thinking of extending the practices with better exception handling in the next version. I wasn't doing it two years ago (only custom exceptions), but today most of my new projects include these handlers.
Thank you for sharing these best practices!
In our projects, we usually define a set of custom exceptions. These are mostly translated into unified error responses.
Eg:
I think it would be great if we could have an
exception_handlers.py
file to handle the mappings from the exceptions to the corresponding error responses.Eg:
The text was updated successfully, but these errors were encountered: