Add 500 page

This commit is contained in:
rubenwardy 2022-02-15 15:26:03 +00:00
parent 9200d7becd
commit e42f6b2cfa
2 changed files with 17 additions and 0 deletions

@ -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:

12
app/templates/500.html Normal file

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}
500 - Internal Server Error
{% endblock %}
{% block content %}
<h1>{{ self.title() }}</h1>
<p>
Don't worry, this error will have been automatically reported.
</p>
{% endblock %}