The caller's breaker state, when the breaker is enabled.
The breaker configuration, when enabled.
The normalized failure from the request pipeline.
The resolved request options, for the onCircuitOpen hook.
The request context, for the onCircuitOpen hook.
The upstream host scope, for the onCircuitOpen hook.
Nothing; mutates the breaker state.
Counts a failed attempt and opens the circuit once the consecutive-failure budget is exhausted. Only availability failures (see isAvailabilityFailure) count: network errors, timeouts, 429s, and 5xx responses. Caller-side errors (4xx) and caller-initiated aborts say nothing about upstream health, so they never advance the streak. And because such a failure proves the upstream answered, it resets the streak like a success would: a stale 500-streak cannot trip the breaker after interleaved caller-side errors. Status-less GraphQL envelope errors are the exception (see isStreakNeutralFailure): they reset nothing, so a sustained outage that manifests as status-less envelope errors can no longer erase the streak other error classes accumulated. When such a failure, including a streak-neutral one, is the reserved post-cooldown probe, the breaker closes (the upstream answered, so it is reachable) instead of wedging the half-open state. When an availability failure is the reserved post-cooldown probe, it clears the half-open state and re-opens the breaker immediately so the next request fast-fails until the cooldown elapses again. The failed probe advances the probe-failure counter, which scales the next cooldown (see scaledCooldownMs) so repeated probe failures back off instead of starving the half-open state at one request per cooldown. Emits
onCircuitOpenon the first trip into open (not on re-opens from a failed probe, which are a continuation of the same open period).