Open
Description
openedon Aug 3, 2023
Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it
With the exception of back-off errors that are handled, database errors get raised as "raw" Error
objects, making catching them properly more challenging.
Describe the preferred solution
Database errors should be caught, their codes parsed, and re-raised as one of the PEP-249 error types.
Reference Documentations/Specifications
https://docs.djangoproject.com/en/4.2/ref/exceptions/#database-exceptions
https://peps.python.org/pep-0249/
Looks like the correct spot to fix this would go quite naturally in this function:
Line 504 in a429dd1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment