diff options
author | Frederick Muriuki Muriithi | 2023-11-28 15:36:28 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-11-28 16:33:22 +0300 |
commit | c1dcd4f20e3e0e89d7e2dce051526d2db36f9579 (patch) | |
tree | 517b6d2db014dae6de5ad973477aec338890f080 /qc_app/__init__.py | |
parent | c213b0010c3ddc8d3215adab65bd489a9b884e30 (diff) | |
download | gn-uploader-c1dcd4f20e3e0e89d7e2dce051526d2db36f9579.tar.gz |
Capture, log and handle generic exceptions
Handle any and all unforeseen error conditions gracefully by capturing
the exceptions, logging out for debug purposes and providing the user
with a generic error page.
Diffstat (limited to 'qc_app/__init__.py')
-rw-r--r-- | qc_app/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qc_app/__init__.py b/qc_app/__init__.py index 6b760b9..4810d45 100644 --- a/qc_app/__init__.py +++ b/qc_app/__init__.py @@ -7,6 +7,7 @@ from flask import Flask from .entry import entrybp from .parse import parsebp from .dbinsert import dbinsertbp +from .errors import register_error_handlers def instance_path(): """Retrieve the `instance_path`. Raise an exception if not defined.""" @@ -29,4 +30,6 @@ def create_app(instance_dir): app.register_blueprint(entrybp, url_prefix="/") app.register_blueprint(parsebp, url_prefix="/parse") app.register_blueprint(dbinsertbp, url_prefix="/dbinsert") + + register_error_handlers(app) return app |