From b4521df539a9817ecf9d70fe5dbe41a5c39d64a0 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 2 Oct 2016 11:21:44 +0000 Subject: Error page: also display the URL --- wqflask/wqflask/templates/error.html | 8 ++++---- wqflask/wqflask/views.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/error.html b/wqflask/wqflask/templates/error.html index 9d9e66d4..95485f1e 100644 --- a/wqflask/wqflask/templates/error.html +++ b/wqflask/wqflask/templates/error.html @@ -17,12 +17,12 @@ together.

- It is important to report this error so we can fix it for everyone. + It is important to report this ERROR so we can fix it for everyone.

Report to the GeneNetwork team by recording the steps you take - to reproduce this error. Next to those steps, copy-paste below + to reproduce this ERROR. Next to those steps, copy-paste below stack trace, either as a new issue (GeneNetwork error: {{message}}) or E-mail this full page to one of the developers @@ -31,6 +31,7 @@

+    {{ stack[0] }}
     {{ message }} (error)
     {{ stack[-3] }}
     {{ stack[-2] }}
@@ -45,8 +46,7 @@
   Toggle full stack trace
   
-      {% for line in stack %}
-        {{ line }}
+      {% for line in stack %} {{ line }}
       {% endfor %}
     
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 40a77df3..12d43052 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -91,10 +91,11 @@ def shutdown_session(exception=None): def handle_bad_request(e): err_msg = str(e) logger.error(err_msg) + logger.error(request.url) # get the stack trace and send it to the logger exc_type, exc_value, exc_traceback = sys.exc_info() logger.error(traceback.format_exc()) - formatted_lines = traceback.format_exc().splitlines() + formatted_lines = [request.url]+traceback.format_exc().splitlines() # Handle random animations # Use a cookie to have one animation on refresh -- cgit v1.2.3