Skip to content

Commit

Permalink
Catch one additional database error on edit book
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzieIsaacs committed Oct 2, 2022
1 parent bd52f08 commit 44f6655
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cps/editbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from flask_babel import lazy_gettext as N_
from flask_babel import get_locale
from flask_login import current_user, login_required
from sqlalchemy.exc import OperationalError, IntegrityError
from sqlalchemy.exc import OperationalError, IntegrityError, InterfaceError
from sqlalchemy.orm.exc import StaleDataError

from . import constants, logger, isoLanguages, gdriveutils, uploader, helper, kobo_sync_status
Expand Down Expand Up @@ -223,7 +223,7 @@ def edit_book(book_id):
calibre_db.session.rollback()
flash(str(e), category="error")
return redirect(url_for('web.show_book', book_id=book.id))
except (OperationalError, IntegrityError, StaleDataError) as e:
except (OperationalError, IntegrityError, StaleDataError, InterfaceError) as e:
log.error_or_exception("Database error: {}".format(e))
calibre_db.session.rollback()
flash(_(u"Database error: %(error)s.", error=e.orig), category="error")
Expand Down

0 comments on commit 44f6655

Please sign in to comment.