style: add debug log for write-back failure in retry path

Address review feedback: replace bare `except: pass` with a debug
log when the post-retry write-back to ~/.claude/.credentials.json
fails. The write-back is best-effort (token is already resolved),
but logging helps troubleshooting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Vandermeulen 2026-04-03 14:40:18 +02:00 committed by Teknium
parent a70ee1b898
commit 78ec8b017f

View file

@ -450,8 +450,8 @@ class CredentialPool:
refreshed["refresh_token"],
refreshed["expires_at_ms"],
)
except Exception:
pass
except Exception as wexc:
logger.debug("Failed to write refreshed token to credentials file (retry path): %s", wexc)
return updated
except Exception as retry_exc:
logger.debug("Retry refresh also failed: %s", retry_exc)