Why API chaos testing exists
Unit tests mock the database as healthy. Integration tests often use a best-case network. The bugs that page you are the other cases: DNS for a billing service fails, Redis is slow, a partner API returns an HTML error page with a 200. PatchFlow treats those as first-class tests — Engine 1 in the dual-engine design — so you inject them before customers do.
The 18 chaos failure modes
Every selected endpoint is exercised against the same library. Modes are grouped the way the injector is implemented:
Network
http_timeout— outbound HTTP hangs with no responseconnection_refused— upstream TCP refuseddns_failure— hostname does not resolveslow_response— 5 second delay to probe client timeoutsconnection_reset— TCP reset mid-transfer
Dependency
http_500,http_429,http_503,http_401,http_404— upstream status codes your handler may not map to a clean client response
Data
malformed_json,empty_response,wrong_content_type,partial_response,null_fields
Resource
db_connection_drop,db_timeout,db_constraint_violation
Team plans can add custom payload injection on top of this set. All listed modes are available on Hobby and Pro.
What a chaos scan actually runs
- DiscoveryAgent catalogs endpoints from the spec, collection, repo, or manual list.
- ChaosAgent selects modes and injects them across those endpoints.
- AnalystAgent labels findings (for example, unhandled
SQLAlchemyErroronGET /orders/{id}) and computes the 0–100 score. - Optionally FixAgent, ReviewAgent, and GitHubAgent open a consolidated draft PR with failure-mode notes in the description.
You can replay the same sequence on the live demo. Scan quota is counted per chaos session — 3 / month on Hobby, 30 on Pro, unlimited on Team.
Use cases
Resilience review before a launch
Point the scanner at staging OpenAPI. Prioritize CRITICAL unhandled modes and leakage. Merge draft PRs that add explicit 503/404 handling rather than shipping bare db.fetch calls.
Regression after an incident
If production hit a truncated JSON body from a gateway, re-run partial_response and malformed_json on the same routes after the fix lands.
Teaching the team what “handled” means
A 200 with a hung worker is not success. The report distinguishes handled (correct error status, no leak), degraded (slow but 200), and unhandled (5xx plus exception text). That vocabulary is useful in code review even when you do not take the auto-generated patch.
Where chaos testing stops
Injection will not see a race that only appears under real user load, or a bug in a code path no spec lists. Pair it with API monitoring: the SDK reports unhandled exceptions from live Node.js, Python, or Spring Boot apps, and after three matching occurrences can open the same style of draft PR. Chaos testing is the rehearsal; monitoring is the show.