Test error conditions.
Fix 412 template to use standard styling that the other 400 templates use. Update forbidden error to return status code 403 instead of 400. Signed-off-by: Mike Terzo <mike@terzo.org>
This commit is contained in:
@@ -121,7 +121,7 @@ def bad_request(e):
|
||||
@app.errorhandler(403)
|
||||
def forbidden(e):
|
||||
envs = environments()
|
||||
return render_template('403.html', envs=envs), 400
|
||||
return render_template('403.html', envs=envs), 403
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block row_fluid %}
|
||||
<div class="container" style="margin-bottom:55px;">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h2>Feature unavailable</h2>
|
||||
<p>You've configured Puppetboard with an API version that does not support this feature.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% block content %}
|
||||
<h1>Feature unavailable</h1>
|
||||
<p>You've configured Puppetboard with an API version that does not support this feature.</p>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user