From ab80084f1cd90faf5e069edc4203668c81e75d63 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 28 Jul 2020 16:59:32 -0700 Subject: generic API error page This error handler and view page currently works much better than the "flash()" infrastructure built-in to flask, which uses cookies and mostly does not work with our views and layouts. Would like to gradually migrate almost all API errors in the web interface to just raising errors that get rendered on an error page, instead of calling `abort(ae.status)`. --- python/fatcat_web/templates/api_error.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 python/fatcat_web/templates/api_error.html (limited to 'python/fatcat_web/templates') diff --git a/python/fatcat_web/templates/api_error.html b/python/fatcat_web/templates/api_error.html new file mode 100644 index 00000000..1a44f610 --- /dev/null +++ b/python/fatcat_web/templates/api_error.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block body %} + +
+
{{ api_error.status or "" }}
+
{{ api_error.reason or "" }}
+
+ +
+ +
+
+ API Error: {{ api_error.error_name or "" }} +
+

{{ api_error.message or "" }} +

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