diff options
author | Alexander_Kabui | 2024-05-29 12:47:12 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-05-29 12:49:22 +0300 |
commit | c9543343c92f7282992d61ff51b50101d66dc059 (patch) | |
tree | 1017a421acc59e579da03c7fad44671d0a8304c3 /gn2/wqflask | |
parent | 632dbb8921228b3f0973043dde545fecca572691 (diff) | |
download | genenetwork2-c9543343c92f7282992d61ff51b50101d66dc059.tar.gz |
Handle attributeError when getting error codes.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r-- | gn2/wqflask/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index a5376a69..5d8a56e5 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 |