Use it when configuring, checking or troubleshooting HTTP Status Codes in APIs.
HTTP Status Codes
Classification of transport/application response outcomes using HTTP status codes together with API-specific error bodies and operation state.
1. Status codes: 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthenticated, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Validation, 429 Too Many Requests, 500/502/503/504 server errors.
2. Treat 4xx as bugs/inputs, 5xx/429 as retryable.
3. Read error bodies.
4. Log codes.
5. Never ignore non-2xx.
response → status class → handling
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Focused checks for this Topic. Stored verification and troubleshooting material remains available below.
Check 1 — Identify the exact request and response
Capture method, URL/resource identity, request ID or correlation ID, HTTP status, response headers and body for the same transaction. Classify expected status semantics in the context of the endpoint contract.
Check 2 — Separate HTTP acceptance from target state
A 2xx status (including 202 Accepted) is not always final convergence. Perform an independent resource/state read-back and check asynchronous operation status where available.
Check 3 — Handle retries according to write safety
For 429 and documented transient failures, consider Retry-After and rate limits. A timeout or 5xx on a non-idempotent write may have occurred after the mutation; verify the target state or use an idempotency key before retrying.
Check 4 — Close on the original operation
Compare expected and observed resource identity, state and timestamps after the operation. Verify the original consumer path; keep illustrative responses separate from actual observed Evidence.
More detailAdditional checks4 sections
Longer notes behind the focused checks above. Start with the checks; use these when you need more detail.
Operational evidence path
request → HTTP status class/code → error body/headers → retry/stop decision → target-state check
Healthy evidence: status handling is method-aware, structured errors and request IDs are captured and uncertain writes are reconciled before retry.
Failure modes and next checks
Suspicious evidence: generic retry on all errors, ignored response body, 2xx treated as final business success or 5xx replay causing duplicate side effects.
Common mistakes
- Retrying 4xx errors that will never succeed.
- Treating 3xx redirects as failures instead of following them.
Where it fails
Where HTTP Status Codes usually goes wrong: method-specific status semantics, retryability, error payload interpretation and terminal versus intermediate success.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- 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.
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
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
The HTTP status identifies the response class for one request, but it does not show whether a side effect occurred before the response failed.
In depth
HTTP status codes tell automation what happened, and good automation reacts to them precisely rather than treating everything non-200 as the same failure.
| Code | Meaning | Automation reaction |
|---|---|---|
| 200/201/204 | Success / created / no content | Continue |
| 301/302/307/308 | Redirect | Follow (or fix URL) |
| 400 | Bad request | Fix input; do not retry |
| 401 | Not authenticated | Refresh/fix credentials |
| 403 | Not authorised | Check permissions/scopes |
| 404 | Not found | Treat as absent if expected |
| 409 | Conflict | Exists already / version clash |
| 422 | Validation error | Fix input |
| 429 | Rate limited | Wait (Retry-After), back off |
| 500 | Server error | Retry carefully, report |
| 502/503/504 | Gateway/unavailable/timeout | Retry with backoff |
Always log the response body for 4xx errors — it usually explains exactly what was wrong.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in APIs > HTTP Status Codes. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc9110 · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
HTTP Status Codes API boundary map
Fast request/delivery, trust, processing and verification boundaries for HTTP Status Codes.
| 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 |
Deep reference
Healthy vs suspicious evidence
Output interpretation
For HTTP Status Codes, rely on structured fields and stable IDs (method-specific status semantics, retryability, error payload interpretation and terminal versus intermediate success) rather than text formatted for display.