Skip to main content

Variable: MOCKED_FAILURE_ATTEMPT

const MOCKED_FAILURE_ATTEMPT: number = Number.MAX_SAFE_INTEGER

Defined in: packages/workflow-engine/src/testing/mock-step-ledger.ts:41

The attempt a mocked failure is recorded at.

step.run rethrows a stored failure only once attempt has passed the step's own retries budget; below it the step is reclaimed and the real body runs. A mocked error is meant to be the step's final answer, so it is recorded above any retry budget a step could declare. Pass mockError(id, err, { attempt }) to seed a lower attempt and let the step's own retries re-enter the real body.