From 6da24f2f2f788424669ed75ba3cea0b8aafc78fa Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 17 Apr 2024 14:52:05 +0200 Subject: [PATCH] Include exception info when something goes wrong while refreshing tokens ``` An error occurred when refreshing user token: (invalid_request) Missing Code ``` is the message we're currently logging, that's not enough to do anything with. --- lib/galaxy/authnz/managers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/authnz/managers.py b/lib/galaxy/authnz/managers.py index 6b526643162e..ba0331d9fc2d 100644 --- a/lib/galaxy/authnz/managers.py +++ b/lib/galaxy/authnz/managers.py @@ -340,9 +340,8 @@ def refresh_expiring_oidc_tokens_for_provider(self, trans, auth): if refreshed: log.debug(f"Refreshed user token via `{auth.provider}` identity provider") return True - except Exception as e: - msg = f"An error occurred when refreshing user token: {e}" - log.error(msg) + except Exception: + log.exception("An error occurred when refreshing user token") return False def refresh_expiring_oidc_tokens(self, trans, user=None):