Catch OperationalError from both peewee and sqlite3.