aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-29 12:47:12 +0300
committerAlexander_Kabui2024-08-29 11:51:01 +0300
commitbeb45534ba6abff2ef94c2de3e37e71fb61ecb3d (patch)
tree85c1da0d7379943a64fb725f3d1019d2cbf39f5b /gn2/wqflask
parenta34e4e2f0f19d2d62bb76eb09e6b156fd8d16b46 (diff)
downloadgenenetwork2-beb45534ba6abff2ef94c2de3e37e71fb61ecb3d.tar.gz
Handle attributeError when getting error codes.
Diffstat (limited to 'gn2/wqflask')
-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 58b092a0..fa8b6c78 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