mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-02-05 22:34:29 +01:00
Adding 502 error handling
This commit is contained in:
@@ -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
13
templates/errors/502.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user