aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py
index 5bfcce83..8f1c62ff 100644
--- a/gn2/wqflask/views.py
+++ b/gn2/wqflask/views.py
@@ -137,7 +137,10 @@ def handle_generic_exceptions(e):
stack={formatted_lines},
error_image=animation,
version=current_app.config.get("GN_VERSION")))
- resp.status_code = exc_type.code or 500
+ try:
+ resp.status_code = exc_type.code
+ except AttributeError:
+ resp.status_code = 500
resp.set_cookie(err_msg[:32], animation)
return resp