diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-09-04 13:21:36 +0200 |
---|---|---|
committer | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-09-04 13:21:36 +0200 |
commit | b7e980f9466959a583dbefca4dc067d82c05fe8c (patch) | |
tree | 001e6e83ea580696ef791353c52709e18c9d21cd /ogcp/views.py | |
parent | 31d2808a43f25052b4ee8ff7404f627439a28026 (diff) |
Add 500 default error handler
This handles HTTP 500 internal server errors.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 1621455..b326a8c 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -19,6 +19,10 @@ def load_config(): def page_not_found(error): return render_template('error.html', message=error), 404 +@app.errorhandler(500) +def page_not_found(error): + return render_template('error.html', message=error), 404 + @app.route('/') def index(): return render_template('base.html') |