The server cannot process the request because it is malformed.
Typical causes: invalid JSON, missing required fields, wrong parameter types, or a bad Content-Type. Check the response body for the exact validation error.
OfficialRFC 9110, Section 15.5.1
Authentication is required or the credentials are invalid.
Really means "unauthenticated". Check that the Authorization header is sent and the token has not expired. The response should include a WWW-Authenticate header.
OfficialRFC 9110, Section 15.5.2
Reserved for future use; some APIs use it when a payment or quota is required.
OfficialRFC 9110, Section 15.5.3
The server understood the request but refuses to authorize it.
The user is known but lacks permission. Logging in again does not help. Also returned by WAFs and for blocked IPs or directory listing.
OfficialRFC 9110, Section 15.5.4
The server cannot find the requested resource.
Check the URL, path parameters, and trailing slashes. Also used instead of 403 to hide that a resource exists.
OfficialRFC 9110, Section 15.5.5
The HTTP method is not supported for this resource.
For example POST to a read-only endpoint. The Allow header lists the supported methods.
OfficialRFC 9110, Section 15.5.6
The server cannot produce a response matching the Accept headers.
OfficialRFC 9110, Section 15.5.7
407Proxy Authentication Required
The client must authenticate with the proxy first (Proxy-Authorization header).
OfficialRFC 9110, Section 15.5.8
The server timed out waiting for the client to finish sending the request.
OfficialRFC 9110, Section 15.5.9
The request conflicts with the current state of the resource.
Typical for duplicate records (unique constraints), edit conflicts, and version mismatches.
OfficialRFC 9110, Section 15.5.10
The resource was permanently removed and will not come back.
Search engines drop 410 URLs faster than 404 URLs.
OfficialRFC 9110, Section 15.5.11
The server requires a Content-Length header.
OfficialRFC 9110, Section 15.5.12
A condition in the request headers (If-Match, If-Unmodified-Since) is false.
Used for optimistic concurrency: someone else changed the resource first.
OfficialRFC 9110, Section 15.5.13
The request body is larger than the server allows. Formerly "Payload Too Large".
Raise the limit, e.g. client_max_body_size in nginx, or upload in chunks.
OfficialRFC 9110, Section 15.5.14
The URL is longer than the server will process.
Usually too much data in the query string; send it in a POST body instead.
OfficialRFC 9110, Section 15.5.15
415Unsupported Media Type
The server does not support the body's format.
Most often a missing or wrong Content-Type, e.g. sending JSON without Content-Type: application/json.
OfficialRFC 9110, Section 15.5.16
The requested byte range is outside the resource's size.
OfficialRFC 9110, Section 15.5.17
The server cannot meet the Expect request header.
OfficialRFC 9110, Section 15.5.18
The server refuses to brew coffee because it is, permanently, a teapot.
An April Fools' joke from the Hyper Text Coffee Pot Control Protocol (1998). The code is reserved so it is never reused, and some sites return it to bots or for requests they will not handle.
OfficialRFC 2324 / RFC 9110, Section 15.5.19
The CSRF token is missing or expired.
Reload the form page to get a fresh token, or include the X-CSRF-TOKEN header in AJAX requests.
UnofficialLaravel
The client is being rate limited. Replaced by 429.
UnofficialTwitter API v1 (legacy)
The request reached a server that cannot respond for this host.
Seen with HTTP/2 connection reuse across hosts that share a certificate.
OfficialRFC 9110, Section 15.5.20
The body is well-formed but contains invalid data. Formerly "Unprocessable Entity".
Common for validation errors in Rails, Laravel, and FastAPI.
OfficialRFC 9110, Section 15.5.21
The resource is locked.
OfficialRFC 4918 (WebDAV)
The request failed because a request it depended on failed.
OfficialRFC 4918 (WebDAV)
The server will not process a request that might be replayed (TLS early data).
OfficialRFC 8470
The client must switch to another protocol, given in the Upgrade header.
OfficialRFC 9110, Section 15.5.22
The server requires a conditional request (e.g. If-Match) to prevent lost updates.
OfficialRFC 6585
The client sent too many requests in a given time (rate limiting).
Wait for the time in the Retry-After header and retry with exponential backoff.
OfficialRFC 6585
431Request Header Fields Too Large
The headers are too large, often because of oversized cookies.
Clearing cookies for the site usually fixes it in the browser.
OfficialRFC 6585
The session expired and the client must log in again.
UnofficialMicrosoft IIS
nginx closed the connection without sending a response.
Used in nginx configs to drop malicious or unwanted requests. Never actually reaches the client.
Unofficialnginx
451Unavailable For Legal Reasons
Access is denied for legal reasons, such as censorship or a court order.
A reference to the novel Fahrenheit 451.
OfficialRFC 7725
494Request Header Too Large
nginx-internal code for headers that are too large; the client sees 400.
Unofficialnginx
The client certificate is invalid.
Unofficialnginx
496SSL Certificate Required
A client certificate is required but was not provided.
Unofficialnginx
497HTTP Request Sent to HTTPS Port
A plain HTTP request was sent to a port that expects HTTPS.
Unofficialnginx
The client closed the connection before the server responded.
Seen in nginx logs when users navigate away or a client timeout is shorter than the server's processing time.
Unofficialnginx