From b7e980f9466959a583dbefca4dc067d82c05fe8c Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Fri, 4 Sep 2020 13:21:36 +0200 Subject: Add 500 default error handler This handles HTTP 500 internal server errors. --- ogcp/views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ogcp') 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') -- cgit v1.2.3-18-g5258