about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-05-28 12:17:29 -0500
committerFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-05-28 12:17:29 -0500
commit8a397f84b95c6769d1a648e17553523ebbb761c8 (patch)
treecbb4106d4d311d58fefbf89b2da9c2c44356f882
parent5d7eef9caf764c56f1e586a616c046d996c1a202 (diff)
downloadgenenetwork3-8a397f84b95c6769d1a648e17553523ebbb761c8.tar.gz
Convert exception objects to strings directly
The .join(...) call assumes the arguments to the exception are always
strings. This assumption is wrong, and leads to failure when
attempting to report the previous failure.
-rw-r--r--gn3/errors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/errors.py b/gn3/errors.py
index f0d499e..e937653 100644
--- a/gn3/errors.py
+++ b/gn3/errors.py
@@ -72,7 +72,7 @@ def handle_authorisation_error(exc: AuthorisationError):
     logger.error("Handling external auth errors - %s", request.url)
     return jsonify(add_trace(exc, {
         "error": type(exc).__name__,
-        "error_description": " :: ".join(exc.args)
+        "error_description": str(exc)
     })), 401
 
 
@@ -130,7 +130,7 @@ def handle_local_authorisation_errors(exc: oautherrors.AuthorisationError):
     logger.error("Handling local auth errors - %s", request.url)
     return jsonify(add_trace(exc, {
         "error": type(exc).__name__,
-        "error_description": " ".join(exc.args)
+        "error_description": str(exc)
     })), 401