AniLink - v3.0.0
    Preparing search index...

    Function executeWithRetry

    • Dispatches one logical request with the full resilience pipeline: the per-attempt circuit check, the pre-dispatch rate-limit pacing wait, the network dispatch, the envelope resolution (including the allowPartialData partial path), the cache write-back, the failure recording, the retry-budget accounting, and every lifecycle-hook emission. It retries retryable failures under the resolved policy until one succeeds or the failure surfaces.

      This loop owns its invariants: it settles the half-open probe exactly once per attempt outcome, fires onResponse exactly once per attempt (the responseReported guard keeps the error path from double-emitting after a success-path emission), the cumulative pacedWaitMs/retryWaitMs accumulators span attempts, and a budget unit is spent exactly when a retry is scheduled.

      Type Parameters

      • T

        The expected response payload type.

      Parameters

      Returns Promise<ExecuteOutcome<T>>

      The resolved value and whether it came from a partial-success envelope.