diff options
-rw-r--r-- | qc_app/errors.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qc_app/errors.py b/qc_app/errors.py index d7d3858..ff656b8 100644 --- a/qc_app/errors.py +++ b/qc_app/errors.py @@ -1,6 +1,7 @@ """Application error handling.""" import logging import traceback +from werkzeug.exceptions import HTTPException import MySQLdb as mdb from flask import Flask, request, render_template, current_app as app @@ -16,4 +17,5 @@ def handle_general_exception(exc: Exception): def register_error_handlers(app: Flask): """Register top-level error/exception handlers.""" app.register_error_handler(Exception, handle_general_exception) + app.register_error_handler(HTTPException, handle_general_exception) app.register_error_handler(mdb.MySQLError, handle_general_exception) |