MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getRetryAfterMs

Function getRetryAfterMs

src/services/api/withRetry.ts:803–812  ·  view source on GitHub ↗
(error: APIError)

Source from the content-addressed store, hash-verified

801const MIN_COOLDOWN_MS = 10 * 60 * 1000 // 10 minutes
802
803function getRetryAfterMs(error: APIError): number | null {
804 const retryAfter = getRetryAfter(error)
805 if (retryAfter) {
806 const seconds = parseInt(retryAfter, 10)
807 if (!isNaN(seconds)) {
808 return seconds * 1000
809 }
810 }
811 return null
812}
813
814function getRateLimitResetDelayMs(error: APIError): number | null {
815 const resetHeader = error.headers?.get?.('anthropic-ratelimit-unified-reset')

Callers 1

withRetryFunction · 0.85

Calls 1

getRetryAfterFunction · 0.85

Tested by

no test coverage detected