Subject your frontend to real-world network instability. Randomly fail requests with configurable failure probabilities (e.g. 25%, 50%, or 75% drop rates) and stochastic jitter delays to verify TanStack Query retries, SWR deduplication, and circuit breakers.
Configure failure likelihood and targeted error codes, then click "Send" repeatedly to observe intermittent failures:
When chaos triggers, the server randomly picks from these status codes.
| Modifier / Header | Type | Valid Values | Behavior |
|---|---|---|---|
| ?_chaos=value | Query Param | 0.0 to 1.0 (or 0-100) | Probability of random rejection. E.g. 0.3 = 30% failure rate. |
| X-Simulate-Chaos | HTTP Header | 0.5 | Header equivalent for CI/CD test runners or automated regression suites. |
| ?_chaos_errors | Query Param | 500,502,503 | Comma-separated list of target HTTP error codes to randomly select from upon failure. |
| Network Jitter | Built-in | 250ms - 1500ms | Whenever chaos triggers, stochastic latency is automatically added to simulate packet lag. |
Configure automatic exponential retries in your data-fetching hooks to make your UI resilient against transient network drops:
Monitor active memory quotas, storage consumption, and visitor session identities.