Skip to main content
The headline use case: make a specific failure happen on demand, then assert your app handles it. Armed faults are the lever, because they work even when unmodified app code makes the call (see why).

Arm, run, assert

The fault returns Deck’s real error envelope — the pack defines its shape, so your error-handling code sees exactly what production sends.

Narrow which calls it hits

An un-narrowed fault hits every matching resource + operation. Scope it so non-matching calls fall through to normal handling:

Clear it

count auto-clears after N fires. Clear manually when you armed it open-ended:
Two other ways to force outcomes, for calls your test makes directly: the X-Mock-Scenario header for a one-off named scenario, and pack-defined magic values (Stripe-style test inputs). Both ride inside the request, so they don’t reach an unmodified app’s call path — that’s why armed faults are the default. See Interception.