clean up log.error (#1109)

This commit is contained in:
Inna Harper 2025-07-09 11:15:14 +01:00 • committed by GitHub
commit 4fee123e72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -464,8 +464,8 @@ class OAuthClientProvider(httpx.Auth):
await self.context.storage.set_tokens(token_response)
return True
except ValidationError as e:
logger.error(f"Invalid refresh response: {e}")
except ValidationError:
logger.exception("Invalid refresh response")
self.context.clear_tokens()
return False
@ -522,8 +522,8 @@ class OAuthClientProvider(httpx.Auth):
token_request = await self._exchange_token(auth_code, code_verifier)
token_response = yield token_request
await self._handle_token_response(token_response)
except Exception as e:
logger.error(f"OAuth flow error: {e}")
except Exception:
logger.exception("OAuth flow error")
raise
# Add authorization header and make request