What is the upper level exception that I can catch SQLAlechmy exceptions with ?
>>> from sqlalchemy import exc >>> dir(exc) [\'ArgumentError\',
To catch any exception SQLAlchemy throws:
from sqlalchemy import exc db.add(user) try: db.commit() except exc.SQLAlchemyError: pass # do something intelligent here
See help(sqlalchemy.exc) and help(sqlalchemy.orm.exc) for a list of possible exceptions that sqlalchemy can raise.