HTTP Status Codes

Quick answer: the first digit tells you who owns the problem. 2xx success, 3xx redirect, 4xx the client's request is wrong, 5xx the server side failed. Debugging a 4xx means fixing the request; debugging a 5xx means checking the server or its upstreams.

1xx — Informational

100ContinueThe server got the headers; send the body.
101Switching ProtocolsProtocol upgrade accepted (e.g. WebSocket).
103Early HintsPreload hints sent before the final response.

2xx — Success

200OKThe request succeeded.
201CreatedA new resource was created.
202AcceptedQueued for later processing; not done yet.
204No ContentSuccess, with an empty body.
206Partial ContentRange request answered with a slice of the resource.

3xx — Redirection

301Moved PermanentlyCanonical URL changed; update links and bookmarks.
302FoundTemporary redirect; keep using the original URL.
303See OtherRedirect after POST, fetching with GET.
304Not ModifiedCached copy is still fresh; no body sent.
307Temporary RedirectLike 302 but method and body are preserved.
308Permanent RedirectLike 301 but method and body are preserved.

4xx — Client errors

400Bad RequestThe request itself is malformed.
401UnauthorizedAuthentication is missing or failed.
403ForbiddenAuthenticated or not, you may not access this.
404Not FoundNo resource at this URL.
405Method Not AllowedThe HTTP method is not supported here.
408Request TimeoutThe client took too long to send.
409ConflictThe request conflicts with current state (e.g. duplicate).
410GoneThe resource existed and is permanently removed.
413Content Too LargeThe request body exceeds the limit.
415Unsupported Media TypeWrong Content-Type for this endpoint.
422Unprocessable ContentWell-formed but semantically invalid (validation errors).
429Too Many RequestsRate limit hit; back off and retry later.

5xx — Server errors

500Internal Server ErrorThe application crashed or errored unexpectedly.
501Not ImplementedThe server does not support this functionality.
502Bad GatewayThe proxy/gateway got an invalid response from upstream.
503Service UnavailableOverloaded, restarting, or in maintenance.
504Gateway TimeoutThe upstream did not answer the proxy in time.

502 vs 503 vs 504 — the reverse-proxy trio

Behind a reverse proxy or load balancer, these three codes report different failures. 502 Bad Gateway means the proxy reached the upstream but the answer was invalid — typically the app crashed, returned garbage, or closed the connection. 503 Service Unavailable means the upstream is known to be unavailable: overloaded, restarting, deploying, or rate-limited at the proxy itself. 504 Gateway Timeout means the upstream accepted the request but did not answer within the proxy's timeout — usually a slow query or a hung worker.

Practical order: check whether the app process is up (502), whether it is saturated or restarting (503), then which upstream call is slow (504). A full walkthrough is in the HTTP errors guide.

References