summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-04 13:21:36 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-04 13:21:36 +0200
commitb7e980f9466959a583dbefca4dc067d82c05fe8c (patch)
tree001e6e83ea580696ef791353c52709e18c9d21cd
parent31d2808a43f25052b4ee8ff7404f627439a28026 (diff)
Add 500 default error handler
This handles HTTP 500 internal server errors.
-rw-r--r--ogcp/views.py4
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')