aboutsummaryrefslogtreecommitdiff
path: root/gn_auth
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/errors.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gn_auth/errors.py b/gn_auth/errors.py
index 496b85c..4b6007a 100644
--- a/gn_auth/errors.py
+++ b/gn_auth/errors.py
@@ -35,8 +35,9 @@ def handle_general_exception(exc: Exception):
current_app.logger.error("Error occurred!", exc_info=True)
content_type = request.content_type
if bool(content_type) and content_type.lower() == "application/json":
+ exc_args = [str(x) for x in exc.args]
msg = ("The following exception was raised while attempting to access "
- f"{request.url}: {' '.join(exc.args)}")
+ f"{request.url}: {' '.join(exc_args)}")
return jsonify(add_trace(exc, {
"error": type(exc).__name__,
"error_description": msg