diff options
author | Frederick Muriuki Muriithi | 2024-04-24 07:50:46 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-04-24 07:54:13 +0300 |
commit | 5474e668539729af3fd8d3434b44d85610643157 (patch) | |
tree | 097ae3146fb2a378a4fb38933762b734e751b6b3 /gn2/wqflask/oauth2 | |
parent | 74ff470d9ae4e0f9cf46e6ad07a5b5c38f10f4f0 (diff) | |
download | genenetwork2-5474e668539729af3fd8d3434b44d85610643157.tar.gz |
Fetch message for authlib errors.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r-- | gn2/wqflask/oauth2/request_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gn2/wqflask/oauth2/request_utils.py b/gn2/wqflask/oauth2/request_utils.py index a453d18e..f92a7f57 100644 --- a/gn2/wqflask/oauth2/request_utils.py +++ b/gn2/wqflask/oauth2/request_utils.py @@ -35,7 +35,8 @@ def process_error(error: Response, if error.status_code in range(400, 500): try: err = error.json() - msg = err.get("error_description", f"{error.reason}") + msg = error.get( + "error", err.get("error_description", f"{error.reason}")) except simplejson.errors.JSONDecodeError as _jde: msg = message return { |