HTTP Status Codes
Cheat sheet · https://pcornel.dk/topic.php?topic=5300
Answer
Classification of transport/application response outcomes using HTTP status codes together with API-specific error bodies and operation state.
Remember
- 2xx ≠ business success; accepted or partial application workflows can still fail later.
- 4xx ≠ always client bug; authorization, quota, concurrency and policy can make the same request valid in another context.
- 5xx ≠ safe retry automatically; the server may have committed a side effect before failing the response.
- Status code ≠ complete diagnosis; structured error body, headers and request ID often identify the real boundary.
First checks
curl -sS -o /dev/null -w '%{http_code}\n' <url>— status code- Handling: 2xx success, 4xx client error, 5xx server error — classification
- Retry only 429/5xx/timeouts — policy
Verify in this order
response → status class → handling
Where it usually breaks
The HTTP status identifies the response class for one request; it does not prove whether a side effect occurred before the response failed.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
HTTP Status Codes 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=5300