From e42f6b2cfa9e2e49298d98327b146bd361e62d70 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 15 Feb 2022 15:26:03 +0000 Subject: [PATCH] Add 500 page --- app/__init__.py | 5 +++++ app/templates/500.html | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 app/templates/500.html diff --git a/app/__init__.py b/app/__init__.py index b6b37640..1191bf2b 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -133,6 +133,11 @@ def page_not_found(e): return render_template("404.html"), 404 +@app.errorhandler(500) +def server_error(e): + return render_template("500.html"), 500 + + @babel.localeselector def get_locale(): if not request: diff --git a/app/templates/500.html b/app/templates/500.html new file mode 100644 index 00000000..7657865a --- /dev/null +++ b/app/templates/500.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %} + 500 - Internal Server Error +{% endblock %} + +{% block content %} +

{{ self.title() }}

+

+ Don't worry, this error will have been automatically reported. +

+{% endblock %}