id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 18292 Database errors get mangled gcbirzan@… nobody "When using the Django wrapper around the database connection, all errors are mangled into two exceptions, DatabaseError and IntegrityError. The only trace of the original exception is in the message, which can be localised, and is not always reliable anyway. This seems to be a design decision as instead of raising the correct exception, a DatabaseError is constructed with the same message: https://code.djangoproject.com/browser/django/trunk/django/db/backends/postgresql_psycopg2/base.py#L56 This makes it non-trivial (bordering on impossible) to do some database stuff through the default django db backends." New feature closed Database layer (models, ORM) dev Normal duplicate Accepted 0 0 0 0 0 0