MCPcopy Create free account
hub / github.com/Effect-TS/effect / retry

Function retry

packages/effect/src/unstable/http/HttpClient.ts:1154–1158  ·  view source on GitHub ↗
(retryAfter: Duration.Duration | undefined)

Source from the content-addressed store, hash-verified

1152 const current = getState(key)
1153 const canRetry = options.times === undefined || retries < options.times
1154 function retry(retryAfter: Duration.Duration | undefined) {
1155 return retryAfter
1156 ? Effect.flatMap(Effect.sleep(retryAfter), () => loop(effect, request, retries + 1))
1157 : loop(effect, request, retries + 1)
1158 }
1159 const inspectResponse = (
1160 response: HttpClientResponse.HttpClientResponse,
1161 adaptive: RateLimiter.AdaptiveConsumeResult | undefined

Callers 2

onSuccessFunction · 0.70
onFailureFunction · 0.70

Calls 2

loopFunction · 0.70
sleepMethod · 0.65

Tested by

no test coverage detected