From 63b2dbfb9da821e30198ceb0bb67fbc2d8a758fb Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 5 Feb 2019 16:47:57 -0800 Subject: add 400 status page --- python/fatcat_web/routes.py | 4 ++++ python/fatcat_web/templates/400.html | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 python/fatcat_web/templates/400.html 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 %} + +
+
400
+
Bad Request
+ +

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! +

+ +{% endblock %} -- cgit v1.2.3