diff --git a/src/claude-usage.ts b/src/claude-usage.ts index 13b81ee..f20daed 100644 --- a/src/claude-usage.ts +++ b/src/claude-usage.ts @@ -206,7 +206,10 @@ async function fetchUsageForToken( * apply to *failures* too — without it an empty cache means every dashboard * refresh hits the API, which itself sustains the very 429s we then report. */ - const recordAttempt = (errorStatus?: number, cooldownUntil?: number): void => { + const recordAttempt = ( + errorStatus?: number, + cooldownUntil?: number, + ): void => { const now = Date.now(); const entry: UsageCacheEntry = usageDiskCache[writeKey] ?? { usage: {}, @@ -308,7 +311,8 @@ async function fetchUsageForToken( tokenKey: legacyTokenCacheKey(token), cacheKey: writeKey, staleMinutes: Math.round(staleMs / 60_000), - retryAfterSec: retryAfterMs != null ? Math.round(retryAfterMs / 1000) : null, + retryAfterSec: + retryAfterMs != null ? Math.round(retryAfterMs / 1000) : null, cooldownSec: Math.round(cooldownMs / 1000), }, 'Claude usage API: rate limited (429)',