Skip to content

Nth Counting

Network and WebSocket rules can include one counting selector.

FieldMeaning
onNthApply only on the Nth matching request or message.
everyNthApply on every Nth matching request or message.
afterNApply after the first N matches have passed.
network: {
failures: [
{ urlPattern: '/api/orders', statusCode: 503, probability: 1, onNth: 3 },
],
}

Counting is per rule object and shared across fetch and XHR for the same config entry. Set at most one of onNth, everyNth, or afterN on a rule.