HTTP errors

HTTP status codes from 400 Bad Request to 504 Gateway Timeout — what they mean and how to fix them on any server.

CodeErrorWhat it means
axios Axios "Network Error" with no response (CORS, DNS, offline or mixed content) Axios shows a generic Network Error and `error.response` is undefined, so there is no status code to inspect.
598 HTTP 598 Network Read Timeout Error A non-standard code some proxies use when the upstream didn't send data before the read timeout.
X-Forwarded-For Wrong client IP: app sees the proxy/load balancer IP instead of the visitor Logs, rate limits and geo rules all show one IP (the proxy) because the real client address is in a forwarded…
400 400 Bad Request: invalid character in header A header contains a character the HTTP parser doesn't accept, such as a newline, a null byte or raw non-ASCII…
400 400 Bad Request: Invalid Hostname The server refused the request because the Host header doesn't match any host it serves.
400 400 Bad Request: multipart boundary not found A multipart/form-data request arrived without a valid boundary, so the server can't split the parts.
400 400 Bad Request: Request Header Or Cookie Too Large The server rejected the request because its headers, usually accumulated cookies, are bigger than it allows.
200 API returns 200 OK with an error in the body (errors hidden from clients and monitors) The response says 200 but the JSON contains `"error": ...`, so clients, retries and monitoring treat it as su…
Transfer-Encoding Both Content-Length and Transfer-Encoding headers present A message has both framing headers, which HTTP says a sender must not do.
CORS CORS: Private Network Access preflight blocked (public site calling localhost/intranet) Chrome blocks a public website from reaching a private IP, localhost or intranet service without explicit per…
201 HTTP 201 Created The request succeeded and a new resource was created, normally returned after POST or PUT.
450 HTTP 450 Blocked by Windows Parental Controls A Microsoft status shown when Windows Parental Controls blocks the requested site.
Redirect loop HTTP→HTTPS redirect loop behind a load balancer or reverse proxy (X-Forwarded-Proto) The app forces HTTPS, but TLS ends at the proxy, so the app always sees HTTP and keeps redirecting.
+ vs %20 Query string space encoded as + vs %20 (wrong values, 404 or signature mismatch) A space appears as `+` in some places and `%20` in others, so values are decoded incorrectly or signatures do…
400 400 Bad Request: missing Host header HTTP/1.1 requires a Host header, and the request didn't include one.
429 429 quota exceeded (daily/monthly API limit) Unlike short-term rate limiting, you used up your daily or monthly allowance for the API key.
CDN cache CDN or browser serving stale content after a deploy Users still see the old CSS, JS or HTML after you released a new version.
Cookie Cookie is set but not sent back (Domain, Path or Secure mismatch) The browser accepted a Set-Cookie but doesn't attach it to later requests, so login or state is lost.
204 HTTP 204 No Content The request succeeded and the server intentionally sent no response body.
BOM JSON parse error caused by a UTF-8 BOM or stray output before the body The response looks like valid JSON but fails to parse because invisible bytes (BOM, whitespace, PHP notices)…
PROXY protocol PROXY protocol error: broken header / unexpected data from the load balancer A server expecting the PROXY protocol header received plain HTTP (or vice versa), so the connection is reject…
premature close Response truncated: connection closed before the full body arrived The server closed the connection early, so the client got only part of the response.
TRACE Security scan: HTTP TRACE / TRACK method enabled The server answers TRACE requests, which a scanner flags as a cross-site tracing risk.
SSE Server-Sent Events arrive all at once (proxy buffering / compression) An EventSource stream shows nothing for a while, then delivers every event in a burst.
Cookie Third-party cookies blocked (embedded login, iframe or widget fails) Browsers block cookies set by another site, so embedded logins, payment frames and trackers stop working.
WebSocket handshake WebSocket handshake: Unexpected response code: 200 (expected 101) The server answered the WebSocket upgrade request with a normal HTTP response instead of 101 Switching Protoc…
Expect 1-second delay with Expect: 100-continue A POST pauses about a second because the client waits for the server's "100 Continue" before sending the body.
Location 201 Created without a Location header (clients can't find the new resource) The API created a resource but doesn't say where it lives, so clients must guess or re-query.
401 401 Bearer error="invalid_token" The API rejected the bearer token as expired, malformed, revoked or not meant for this API.
401 401 Unauthorized without WWW-Authenticate header The server answered 401 but didn't say which authentication scheme to use.
403 403 Bearer error="insufficient_scope" The token is valid, but it doesn't carry the scope (permission) this endpoint requires.
404 404 because the URL is double-encoded (%2520 instead of %20) A link contains %25 sequences, so the server looks for a file name with literal percent signs and finds nothi…
404 404 on JS/CSS assets after a new deploy The page loads old HTML that points to hashed asset files the new deploy removed.
404 404 only on Linux: file path case mismatch (Image.PNG vs image.png) A file works on Windows or macOS but returns 404 on the Linux server because the name's capitalisation differ…
405 405 Method Not Allowed on OPTIONS (CORS preflight) The browser's CORS preflight (OPTIONS) request is rejected, so the real request never gets sent.
429 429 Too Many Requests: honouring Retry-After The server told you to slow down and said how long to wait with a Retry-After header.
503 503 Service Unavailable with Retry-After (maintenance) The service is temporarily down, usually for planned maintenance or deploys, and says when to retry.
460 AWS ALB 460 Client Closed Connection The client closed the connection before the Application Load Balancer sent its response.
463 AWS ALB 463 X-Forwarded-For header has too many IP addresses The ALB received a request whose X-Forwarded-For header lists more than 30 IP addresses.
561 AWS ALB 561 Unauthorized (identity provider error) An ALB authenticate action got an error from the identity provider (IdP) while authenticating the user.
401 Browser keeps asking for username and password (Basic auth prompt loop) The login dialog reappears after entering credentials, because the server keeps answering 401.
Vary Cache hit rate collapses: Vary: Cookie or Vary: * on responses A Vary header makes caches store a separate copy per cookie or header value, so almost nothing is served from…
ETag Conditional requests always return 200 (ETag/Last-Modified never matches) The client sends If-None-Match or If-Modified-Since, but the server never answers 304, so the full body is re…
Set-Cookie Cookie rejected: SameSite=None requires the Secure attribute A cookie marked SameSite=None without Secure is dropped by modern browsers.
EventSource EventSource keeps reconnecting (error event / server closes stream) The browser's EventSource reconnects again and again, hammering the server.
fetch fetch() doesn't throw on 404/500 — response.ok must be checked The code's catch block never runs for HTTP errors, so failed requests look successful.
HEAD HEAD request returns a different status or headers than GET Monitors and link checkers using HEAD see errors (405, 404, different length), while GET works in the browser.
202 HTTP 202 Accepted The server accepted the request for processing, but the work is not finished yet.
206 HTTP 206 Partial Content The server returned only the byte range the client asked for with a Range header.
207 HTTP 207 Multi-Status A WebDAV response that carries several independent status codes in one XML body.
420 HTTP 420 Enhance Your Calm A non-standard rate-limit response (originally Twitter's) telling you to slow down.
440 HTTP 440 Login Time-out (IIS) Microsoft IIS reports that the client's session has expired and a new login is needed.
449 HTTP 449 Retry With A Microsoft extension asking the client to retry after supplying the required information.
498 HTTP 498 Invalid Token A non-standard code (used by Esri/ArcGIS and some APIs) meaning the access token is expired or invalid.
510 HTTP 510 Not Extended The server needs further extensions to the request (RFC 2774) and the client didn't provide them.
ENHANCE_YOUR_CALM HTTP/2 ENHANCE_YOUR_CALM (too many streams / rapid reset) The server closed an HTTP/2 connection because the client opened or reset streams too fast.
GOAWAY HTTP/2 GOAWAY received (connection closed by server) The server sent an HTTP/2 GOAWAY frame, telling the client to stop opening new streams on this connection.
Alt-Svc / QUIC HTTP/3 (QUIC) not used or failing — Alt-Svc fallback to HTTP/2 The site advertises HTTP/3 via Alt-Svc, but the browser can't use it and falls back to HTTP/2 (slower, or err…
502 Intermittent 502 caused by keep-alive timeout mismatch The proxy reuses a connection the backend has just closed, so a random request fails with 502.
chunked Malformed chunked encoding (invalid chunk size / premature end) The body claims to use chunked transfer encoding, but the chunk sizes or terminator are wrong.