Loading...
Loading...
The status codes engineers see most often, color-coded, with what causes them and how to handle them.
Provisional, used for protocol upgrades and continuation. Rarely seen in app code.
The server received the request headers and the client should send the body.
When: Used during HTTP/1.1 with Expect: 100-continue.
The server is switching protocols, often to WebSockets.
When: WebSocket handshake.
The request was received, understood, and accepted.
Standard success.
When: Most successful GET, POST, PUT responses.
A new resource was created.
When: POST to create endpoints.
Request accepted for processing but not finished.
When: Async / queued operations.
Success with no body to return.
When: Successful DELETE or PUT with no payload.
The client must take additional action to complete the request.
The resource has a new permanent URL.
When: Permanent URL changes; SEO-safe redirect.
The resource is temporarily at a different URL.
When: Login redirects, A/B tests.
Cached version is still valid.
When: Conditional GET with ETag / If-Modified-Since.
Like 302 but preserves the HTTP method.
When: Reliable temporary redirect for POSTs.
Like 301 but preserves method.
When: Permanent redirect for non-GET methods.
Something is wrong with the request itself the client must fix it.
Malformed request the server can't understand.
When: Missing fields, invalid JSON, schema violations.
Fix: Validate and re-send.
Authentication is required and missing or invalid.
When: No token, expired token, wrong credentials.
Fix: Sign in or refresh the token.
Authenticated, but not allowed.
When: RBAC denial, IP allowlist mismatch.
Fix: Use an account with the right permissions.
The resource doesn't exist (or you can't see it).
When: Bad URL, deleted record, soft-deletion.
Fix: Check the path or slug.
The HTTP method isn't supported on this URL.
When: POST to a GET-only endpoint.
Fix: Use the right verb.
The request conflicts with current state.
When: Duplicate keys, optimistic-lock failures.
Fix: Reload state and retry.
Syntactically valid but semantically wrong.
When: Validation errors past schema check.
Fix: Fix the field values and retry.
Rate limit exceeded.
When: Burst beyond quota.
Fix: Back off and retry per the Retry-After header.
The server failed to fulfill a valid request.
Generic server failure.
When: Unhandled exception, panicked process.
Fix: Check logs and stack traces.
Upstream returned an invalid response.
When: Upstream service crashed or timed out.
Fix: Check upstream health, retry.
Server temporarily can't handle the request.
When: Maintenance, overload, dependency outage.
Fix: Retry with backoff.
Upstream didn't respond in time.
When: Slow upstream, hot DB query.
Fix: Optimize upstream, raise timeout, add caching.
We turn AI cheatsheets into production code. Tell us what you're building.