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

Function retryForbidden

packages/effect/src/unstable/eventlog/EventLogRemote.ts:200–216  ·  view source on GitHub ↗
(
    effect: Effect.Effect<A, E, R>,
    options: {
      readonly identity: Identity["Service"]
    }
  )

Source from the content-addressed store, hash-verified

198 }
199
200 const retryForbidden = <A, E, R>(
201 effect: Effect.Effect<A, E, R>,
202 options: {
203 readonly identity: Identity["Service"]
204 }
205 ) =>
206 Effect.retry(effect, {
207 while(e) {
208 hello = null
209 const isForbidden = Predicate.isTagged(e, "EventLogProtocolError") &&
210 (e as any as EventLogProtocolError).code === "Forbidden"
211 return Cache.invalidate(authCache, options.identity.publicKey).pipe(
212 Effect.as(isForbidden)
213 )
214 },
215 times: 5
216 })
217
218 let chunkedIdCounter = 0
219

Callers 1

EventLogRemote.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected