HTTP Status Codes: A Debugging Guide for API Integrations

Debugging · Updated August 2026 · ← All tips

A status code is the server's one-line diagnosis of your request. Read it precisely and you usually know whose bug it is — yours, theirs, or the network's — before opening a single log. Here's what each family really tells you, including the pairs that developers mix up daily.

The pairs everyone confuses

401 vs 403 — "who are you?" vs "you can't do that"

400 vs 422 — "can't parse it" vs "parsed it, it's wrong"

404 — not always "wrong URL"

Besides a typo'd path, a 404 can mean an unresolved variable ({{baseUrl}} empty → request went to the wrong host), a missing API version prefix (/v1/), or a deliberate mask for 403 so the API doesn't reveal that the resource exists.

The rest of the 4xx family worth knowing

CodeMeaningFirst thing to check
405Method not allowedPOST vs PUT vs PATCH — check the docs, and the Allow response header
409ConflictDuplicate unique field, or stale version in optimistic locking
415Unsupported media typeYour Content-Type header
429Too many requestsRetry-After header; add backoff, don't hammer

5xx — probably their bug, but verify

No status at all? It never reached the server

Connection refused, DNS failure, TLS certificate errors and timeouts are transport failures — there is no HTTP response to read. Triage differently: is the host reachable, is the port right, is a VPN or proxy in the way, did you hit http:// on an HTTPS-only port? RestRuno explains these cases in plain language in the response panel ("connection refused by localhost:9999", host not resolving, TLS problem) with a What to check list.

A 60-second triage flow

  1. Read the code family. 4xx → inspect your request. 5xx → minimize and report. No response → transport.
  2. Read the response body. Good APIs tell you the exact field and reason.
  3. Inspect the final request — after variable resolution. Half of "the API is broken" is an empty {{token}}.
  4. Reproduce it minimally. Strip the request to the smallest failing version; the removed piece is your answer.
  5. Pin it with a test so the regression can't return: rr.expect(rr.response.status).toBe(200) is the cheapest alarm system you'll ever install. (More in API testing best practices.)

Debug faster with RestRuno

Plain-language network error explanations, a console that logs every request, and tests that pin the fix. Free for Windows, macOS and Linux.

Download RestRuno — free