about summary refs log tree commit diff
path: root/gn2
diff options
context:
space:
mode:
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/oauth2/request_utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gn2/wqflask/oauth2/request_utils.py b/gn2/wqflask/oauth2/request_utils.py
index 167d0cbd..673a7da9 100644
--- a/gn2/wqflask/oauth2/request_utils.py
+++ b/gn2/wqflask/oauth2/request_utils.py
@@ -41,8 +41,10 @@ def process_error(error: Response,
     if error.status_code in range(400, 500):
         try:
             err = error.json()
-            msg = err.get(
-                "error_message", err.get("error_description", f"{error.reason}"))
+            potential_keys = [key for key in err.keys() if key.startswith("error")]
+            msg = f"{error.reason}"
+            if potential_keys:
+                msg = " ; ".join([f"{k}: {err[k]}" for k in potential_keys])
         except simplejson.errors.JSONDecodeError as _jde:
             msg = message
         return {