footprintjs - v11.2.0
    Preparing search index...

    Interface FlowStageRetryEvent

    Event passed to FlowRecorder.onStageRetry — one failed attempt at a stage that carries a declared import('../types.js').RetryPolicy, and which WILL be attempted again.

    WHY this event exists: a retry hand-rolled inside a stage function leaves no mark on the trace at all. This event is what makes a declared retry part of the record — which attempt failed, why, how long the engine waited, and how many attempts the policy allows.

    Fires only for attempts followed by another attempt. The final failure takes the ordinary error path (onError), so the two never double-report the same failure: an exhausted attempts: 3 policy emits 2 retry events + 1 error event; a retryOn that declines emits 0 retry events + 1 error event. Each attempt — retried or not — also fires FlowAttemptEvent first (10.1), which is where a declined stop is recorded (reason: 'declined').

    interface FlowStageRetryEvent {
        attempt: number;
        channel?: "flow";
        delayMs: number;
        maxAttempts: number;
        message: string;
        stageId: string;
        stageName: string;
        structuredError: StructuredErrorInfo;
        traversalContext?: TraversalContext;
    }
    Index
    attempt: number

    Which attempt just FAILED, 1-based.

    channel?: "flow"

    Explicit channel discriminant — see FlowErrorEvent.channel.

    delayMs: number

    Milliseconds the engine will wait before the next attempt. 0 = immediate.

    maxAttempts: number

    Total attempts the policy allows, including the first.

    message: string

    Human-readable message — the same string onError would carry.

    stageId: string

    Stable stage identifier from the builder (matches spec node id).

    stageName: string
    structuredError: StructuredErrorInfo

    Structured details of the error that ended this attempt.

    traversalContext?: TraversalContext