We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@api.errorhandler
1 parent 4afbb1b commit e74b2e5Copy full SHA for e74b2e5
src/dat_backend/__init__.py
@@ -42,11 +42,11 @@
42
cache = Cache(config={"CACHE_TYPE": "SimpleCache", "CACHE_DEFAULT_TIMEOUT": 60})
43
cache.init_app(app)
44
45
+# Required for the error handler below to work correctly.
46
+app.config.update({"PROPAGATE_EXCEPTIONS": True})
47
+
48
-# Note: both deocrators are necessary or this function will not work in non-dev
-# environments.
49
@app.errorhandler(Exception) # noqa
-@api.errorhandler # noqa
50
def handle_exception(e):
51
"""Handle any exceptions raised from the application.
52
0 commit comments