Fault injection
Random failures at configurable probability.
Returns a failure response with probability p, otherwise 200. Both outcomes include X-Chaos-Flaky-Failed and X-Chaos-Flaky-Probability headers so clients can distinguish a chaos failure from a real one.
Selects one chaos endpoint at random and returns its response. The selected path is reported in X-Chaos-Random-From so failing clients can pin down which scenario tripped them. Streaming endpoints (/slow, /drip, /partial-stream) are excluded so each pick returns promptly.
The only endpoint whose response is non-deterministic. Useful for testing retry logic, circuit breakers, and failure rate monitoring — scenarios where you need failures to happen at a known rate rather than never or always.
The X-Chaos-Flaky-Failed header is always present, so a monitoring client
can tell the difference between an injected failure and a real one without
parsing the body.
Set ?p=0 to verify that your retry wiring is correct without actually
triggering failures. Set ?p=1 to test the full failure path every time.