1. Mike Bayer
  2. sqlalchemy

Issues

Issue #3075 resolved

support non-standard DBAPI exception classes

Mike Bayer
repo owner created an issue

apparently psycopg2 has an OperationalError subclass psycopg2.extensions.TransactionRollbackError. We should be reporting this at least as an OperationalError and not dropping down to DBAPIError.

Comments (7)

  1. Mike Bayer reporter
    • The exception wrapping system for DBAPI errors can now accommodate non-standard DBAPI exceptions, such as the psycopg2 TransactionRollbackError. These exceptions will now be raised using the closest available subclass in sqlalchemy.exc, in the case of TransactionRollbackError, sqlalchemy.exc.OperationalError. fixes #3075

    → <<cset 83326bf44c59>>

  2. Mike Bayer reporter
    • The exception wrapping system for DBAPI errors can now accommodate non-standard DBAPI exceptions, such as the psycopg2 TransactionRollbackError. These exceptions will now be raised using the closest available subclass in sqlalchemy.exc, in the case of TransactionRollbackError, sqlalchemy.exc.OperationalError. fixes #3075

    → <<cset 8513fb588f7f>>

  3. Log in to comment