summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-02-05 16:47:57 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-02-05 16:50:05 -0800
commit63b2dbfb9da821e30198ceb0bb67fbc2d8a758fb (patch)
treeee47caca611bd1fc5f3ea70a6b56e735fdd344a9 /python/fatcat_web
parente43cab07166a9ce8c73968ea145daf1c2b01094a (diff)
downloadfatcat-63b2dbfb9da821e30198ceb0bb67fbc2d8a758fb.tar.gz
fatcat-63b2dbfb9da821e30198ceb0bb67fbc2d8a758fb.zip
add 400 status page
Diffstat (limited to 'python/fatcat_web')
-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 %}