Skip to content
Latchkey

What Is an HTTP Status Code? The Result of Every Request

An HTTP status code is a three-digit number a server returns with every response to report the outcome of a request, grouped into families that signal success, redirection, client error, or server error.

Status codes are how a server tells a client what happened. Because pipelines interact with the web almost entirely over HTTP, reading status codes is the fastest way to understand why a step passed or failed. The first digit alone tells you which side of the conversation went wrong.

The five families

  • 1xx informational, rarely seen directly.
  • 2xx success, like 200 OK and 201 Created.
  • 3xx redirection to another location.
  • 4xx client errors, like 400, 401, 404.
  • 5xx server errors, like 500, 502, 503.

Client versus server fault

A 4xx means your request was wrong: bad input, missing auth, or a missing resource. A 5xx means the server failed to handle a valid request. This split is the first thing to check when a call fails.

Retryable or not

Most 4xx errors are not retryable because the request itself must change, with 429 being the notable exception. Many 5xx errors are transient and worth retrying after backoff.

Status codes in CI

Pipelines decide success or failure of an API step by its status code. A 2xx proceeds, a 4xx usually fails fast, and a 5xx may trigger a retry before failing.

Redirects can surprise you

A 3xx redirect that a client does not follow can look like a failure. Tools usually follow redirects, but a misconfigured one can drop auth headers or loop.

Driving retry logic

Smart retry logic keys off the status code: back off on 5xx and 429, fail fast on other 4xx. Latchkey runners apply exactly this distinction, retrying transient 5xx and 429 responses to common endpoints while surfacing genuine 4xx errors.

Key takeaways

  • An HTTP status code reports the outcome of a request in five numbered families.
  • A 4xx is a client fault and a 5xx is a server fault, which guides debugging.
  • 5xx and 429 are often retryable; other 4xx errors need a fixed request.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →