aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/routes.py4
-rw-r--r--python/fatcat_web/templates/400.html13
2 files changed, 17 insertions, 0 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 1cb0b4d4..9a52382e 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -436,6 +436,10 @@ def page_not_found(e):
def page_not_authorized(e):
return render_template('403.html'), 403
+@app.errorhandler(400)
+def page_bad_request(e):
+ return render_template('400.html'), 400
+
@app.errorhandler(409)
def page_edit_conflict(e):
return render_template('409.html'), 409
diff --git a/python/fatcat_web/templates/400.html b/python/fatcat_web/templates/400.html
new file mode 100644
index 00000000..f2659ca2
--- /dev/null
+++ b/python/fatcat_web/templates/400.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% block body %}
+
+<center>
+<div style="font-size: 8em;">400</div>
+<div style="font-size: 3em;">Bad Request</div>
+
+<p>Wasn't able to handle the request, either due to incorrect or unexpected
+input. Usually more context should be available; if you hit this page it means
+you've discovered a new corner case!
+</center>
+
+{% endblock %}