API Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=5317
Answer
Evidence-first isolation of API failures from caller and endpoint selection through transport, authentication, request contract, server processing and target verification.
Remember
- Symptom ≠ root cause; an HTTP error can be downstream of DNS, TLS, auth, schema, policy or application state.
- Works in browser/tool ≠ automation works; identity, headers, proxy, environment and serialization can differ.
- Retry success ≠ root cause fixed; transient recovery can hide quota, race or backend instability.
- 2xx after change ≠ incident resolved; the original target outcome and regressions must be verified.
First checks
curl -v <url>— full exchange- Error body and request ID — details
- Compare with API docs/examples — correctness
Commands
curl -sS -D - -o /dev/null <url>- Read-only/validation observation for HTTP/TLS/connectivity status and response headers from a documented read-only endp…
curl -v
Verify in this order
DNS/TLS → auth → request validation → server → response
Where it usually breaks
A changed status code or one successful retry proves only that the observed path changed; root cause remains open until the first failed boundary is explained and the target outcome is stable.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
API Troubleshooting API boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Caller / request | Environment/version, identity and exact request contract are attributable | Hidden defaults, wrong endpoint/version, leaked or mismatched credentials |
| Server / response | Status, headers, structured body and request ID are interpreted together | Status-only handling, ignored error body, ambiguous async result or unsafe retry |
| State / proof | Write result is reconciled with resource read-back or acceptance test | Response success treated as final target success without verification |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5317