Adding 502 error handling

This commit is contained in:
Kevin Chung
2015-06-28 20:55:39 -04:00
parent 34273de55e
commit 02a5810049
2 changed files with 18 additions and 1 deletions

View File

@@ -10,5 +10,9 @@ def init_errors(app):
return render_template('errors/403.html'), 403
@app.errorhandler(500)
def forbidden(error):
def general_error(error):
return render_template('errors/500.html'), 500
@app.errorhandler(502)
def gateway_error(error):
return render_template('errors/502.html'), 502

13
templates/errors/502.html Normal file
View File

@@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block content %}
<div class="row">
<h2 style="text-align:center;">That action isn't allowed</h2>
</div>
{% endblock %}
{% block scripts %}
{% endblock %}