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

Function onSuccess

packages/effect/src/unstable/http/HttpClient.ts:660–663  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

658 return Effect.uninterruptibleMask((restore) =>
659 Effect.matchCauseEffect(restore(effect), {
660 onSuccess(response) {
661 responseRegistry.register(response, controller)
662 return Effect.succeed(new InterruptibleResponse(response, controller))
663 },
664 onFailure(cause) {
665 if (Cause.hasInterrupts(cause)) {
666 controller.abort()

Callers

nothing calls this directly

Calls 4

inspectResponseFunction · 0.85
registerMethod · 0.80
retryFunction · 0.70
succeedMethod · 0.45

Tested by

no test coverage detected