diff --git a/src/kognic/auth/base/auth_client.py b/src/kognic/auth/base/auth_client.py index 965de08..f3bb6ad 100644 --- a/src/kognic/auth/base/auth_client.py +++ b/src/kognic/auth/base/auth_client.py @@ -9,7 +9,10 @@ class AuthClient: def _log_new_token(self): - log.info(f"Got new token, with ttl={self.token['expires_in']} and expires {self.expires_at}") + if "expires_in" in self.token: + log.info(f"Got new token, with ttl={self.token['expires_in']} and expires {self.expires_at}") + else: + log.warning(f"Got new token that is likely not valid: missing expires_in but got {self.token.keys()}") @property def access_token(self):