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 %} +
+ Don't worry, this error will have been automatically reported. +
+{% endblock %}