aboutsummaryrefslogtreecommitdiff
path: root/gn_auth
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/errors.py5
-rw-r--r--gn_auth/templates/50x.html25
2 files changed, 29 insertions, 1 deletions
diff --git a/gn_auth/errors.py b/gn_auth/errors.py
index d50d7c1..df3aa86 100644
--- a/gn_auth/errors.py
+++ b/gn_auth/errors.py
@@ -37,7 +37,10 @@ def handle_general_exception(exc: Exception):
"error_description": msg
})), 500
- return render_template("500.html", page=request.url), 500
+ return render_template("50x.html",
+ page=request.url,
+ error=exc,
+ trace=traceback.format_exception(exc)), 500
def handle_authorisation_error(exc: AuthorisationError):
diff --git a/gn_auth/templates/50x.html b/gn_auth/templates/50x.html
new file mode 100644
index 0000000..859a232
--- /dev/null
+++ b/gn_auth/templates/50x.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%}
+
+<p>The system has done something it should not! This is our fault.</p>
+
+<p>
+ Please send us the details below to help us figure out what we did wrong and
+ fix it.
+</p>
+
+<div class="row">
+ <p><strong>URI: {{page}}</p>
+ <pre>{{"".join(trace)}}</pre>
+</div>
+
+{%endblock%}