aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/oauth2
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-24 07:50:46 +0300
committerFrederick Muriuki Muriithi2024-04-24 07:54:13 +0300
commit5474e668539729af3fd8d3434b44d85610643157 (patch)
tree097ae3146fb2a378a4fb38933762b734e751b6b3 /gn2/wqflask/oauth2
parent74ff470d9ae4e0f9cf46e6ad07a5b5c38f10f4f0 (diff)
downloadgenenetwork2-5474e668539729af3fd8d3434b44d85610643157.tar.gz
Fetch message for authlib errors.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r--gn2/wqflask/oauth2/request_utils.py3
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 {