From 1740ccbe30946aa6693a6a9ed8211a2ff7cfbf3d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 9 Jul 2025 11:51:37 -0500 Subject: Improve error handling and reporting. - Refactor out common functionality into reusable utilities - Handle errors from the Authlib library/package - Handle 4xx errors generically. --- gn_auth/templates/http-error-5xx.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gn_auth/templates/http-error-5xx.html (limited to 'gn_auth/templates/http-error-5xx.html') diff --git a/gn_auth/templates/http-error-5xx.html b/gn_auth/templates/http-error-5xx.html new file mode 100644 index 0000000..859a232 --- /dev/null +++ b/gn_auth/templates/http-error-5xx.html @@ -0,0 +1,25 @@ +{%extends "base.html"%} + +{%block title%} +{{error.status_code or 500}}: {{error.description or "Generic Exception"}} +{%endblock%} + +{%block pagetitle%} +{{error.status_code or 500}}: {{error.description or "Generic Exception"}} +{%endblock%} + +{%block content%} + +
The system has done something it should not! This is our fault.
+ ++ Please send us the details below to help us figure out what we did wrong and + fix it. +
+ +URI: {{page}}
+{{"".join(trace)}}
+