Open nguyen1tech opened 7 months ago
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!
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: