The Complete HTTP Status Codes & Error Resolution Guide
An all-inclusive guide detailing every standard IANA status code, RFC extension, WebDAV status, and custom vendor response (Cloudflare, NGINX, AWS, IIS) with actionable fixes.
1xx: Informational Codes
1xx SeriesContinue
Initial request headers received; client should proceed to send the body payload[cite: 4].
- Include
Expect: 100-continueheader before transmitting large POST/PUT requests[cite: 4].
Switching Protocols
Server agrees to switch protocols based on the client Upgrade request header[cite: 4].
- Ensure reverse proxies pass
UpgradeandConnectionheaders for WebSockets[cite: 4].
Processing (WebDAV)
Server has accepted the request but has not completed processing (prevents connection timeouts)[cite: 4].
Early Hints
Returns preliminary headers before final payload, allowing browsers to start preloading assets[cite: 4].
Upload Complete
Draft RFC extension used in resumable uploads to signal that file payload transmission is finished.
2xx: Success Codes
2xx SeriesOK
Standard success response for completed HTTP requests[cite: 4].
Created
Request succeeded and a new resource was created. Includes a Location header[cite: 4].
Accepted
Request accepted for processing, but background execution is asynchronous and incomplete[cite: 4].
Non-Authoritative Information
Request processed successfully, but returned metadata from a third-party copy.
No Content
Successfully processed; intentionally returns an empty response body[cite: 4].
Reset Content
Directs the client to reset the active view (e.g., clear form input fields).
Partial Content
Delivers part of the resource requested via client Range header (video streaming)[cite: 4].
Multi-Status (WebDAV)
Conveys status details for multiple sub-operations inside an XML response payload.
Already Reported (WebDAV)
Prevents repeated enumeration of WebDAV bindings inside multi-status responses.
IM Used
Server fulfilled GET request; response represents result after applying instance manipulations.
3xx: Redirection Codes
3xx SeriesMultiple Choices
Multiple resource representations available; client should select one.
Moved Permanently
Target resource assigned a new permanent URI[cite: 4]. Update references to retain SEO link equity[cite: 4].
Found (Temporary Redirect)
Resource temporarily resides under a different URI[cite: 4].
See Other
Directs client to fetch target resource at another URI using a GET request method.
Not Modified
Conditional GET resulting in no changes; client can reuse cached copy[cite: 4].
Use Proxy (Deprecated)
Legacy code specifying that requested resource must be accessed via proxy.
Temporary Redirect (Preserve Method)
Temporary redirect; guarantees request HTTP verb (e.g., POST) remains unchanged[cite: 4].
Permanent Redirect (Preserve Method)
Permanent redirect; guarantees request HTTP verb remains unchanged[cite: 4].
4xx: Client Error Codes & Fixes
4xx SeriesBad Request
Request cannot be processed due to bad syntax or malformed JSON body[cite: 4].
- Validate JSON structure and headers prior to dispatch[cite: 4].
Unauthorized
Lacks valid authentication credentials for the requested target[cite: 4].
- Provide a valid
Authorization: Bearer <token>header[cite: 4].
Payment Required
Reserved for digital payment schemes; used when API quota balance is empty.
Forbidden
Authenticated, but lacks authorization permissions to access target resource[cite: 4].
- Audit user roles/scopes and verify backend access rules[cite: 4].
Not Found
Server cannot locate the requested URL path[cite: 4].
- Configure routing fallbacks or set up 301 redirects[cite: 4].
Method Not Allowed
HTTP method not supported by endpoint[cite: 4]. Switch to allowed verb listed in Allow header[cite: 4].
Not Acceptable
Resource cannot generate content matching client Accept headers.
Proxy Authentication Required
Client must authenticate itself with a proxy server first.
Request Timeout
Server timed out waiting for complete client request[cite: 4]. Check upload bandwidth[cite: 4].
Conflict
Request conflicts with server state (e.g., duplicate unique entry)[cite: 4].
Gone
Target resource permanently deleted with no forwarding address.
Length Required
Server refuses request unless Content-Length header is specified.
Precondition Failed
Preconditions in request header fields evaluated to false on server.
Payload Too Large
Payload body exceeds defined server body limits[cite: 4].
- Increase maximum body limit (e.g., Nginx:
client_max_body_size 50M;)[cite: 4].
URI Too Long
Requested URL path / query string is longer than server is willing to interpret.
Unsupported Media Type
Payload format unsupported[cite: 4]. Set valid Content-Type header[cite: 4].
Range Not Satisfiable
Range specified in Range header field cannot be fulfilled.
Expectation Failed
Expectation given in request Expect header field could not be met.
I'm a teapot
RFC 2324 April Fools Joke; returned by teapots requested to brew coffee.
Misdirected Request
Request directed at server unable to produce a response (e.g., TLS SNI mismatch).
Syntax correct, but semantic field validation failed.
Locked (WebDAV)
Target resource is locked against concurrent edits.
Failed Dependency (WebDAV)
Request failed due to failure of a previous dependent request.
Too Early
Server unwilling to risk processing request that might be replayed.
Upgrade Required
Server refuses request using current protocol; requires client upgrade.
Precondition Required
Origin server requires request to be conditional.
Too Many Requests
Client exceeded rate limits within time window[cite: 4].
- Use exponential backoff with jitter; respect
Retry-Afterheader[cite: 4].
Request Header Fields Too Large
Server unwilling to process request because header fields or cookies are too large.
Unavailable For Legal Reasons
Access denied due to official legal demands or government orders.
5xx: Server Error Codes & Fixes
5xx SeriesInternal Server Error
Generic catch-all error indicating unhandled exceptions or code crashes[cite: 4].
- Check error trackers (Sentry/Datadog) and handle unhandled promise rejections[cite: 4].
Bad Gateway
Reverse proxy received invalid response from upstream application service[cite: 4].
- Ensure backend app process (Node, Gunicorn, PHP-FPM) is active[cite: 4].
Service Unavailable
Server down for maintenance or overloaded by traffic spikes[cite: 4].
- Autoscale app instances; serve 503 with a
Retry-Afterheader[cite: 4].
Gateway Timeout
Reverse proxy timed out waiting for upstream backend response[cite: 4].
- Optimize database queries; offload tasks to background queues[cite: 4].
HTTP Version Not Supported
Server does not support HTTP protocol version used in request[cite: 4].
Variant Also Negotiates
Transparent content negotiation configuration error resulting in circular references.
Insufficient Storage (WebDAV)
Server unable to store representation needed to complete request.
Loop Detected (WebDAV)
Server terminated request because it detected an infinite processing loop.
Not Extended
Further extensions to request required for server to fulfill it.
Network Authentication Required
Client must authenticate to gain network access (e.g., Wi-Fi captive portals).
Vendor Extensions (NGINX, Cloudflare, AWS, IIS)
Vendor SeriesClient Closed Connection (AWS ALB)
Client closed the connection before AWS Load Balancer could finish transmitting request.
Invalid X-Forwarded-For (AWS ALB)
The X-Forwarded-For header contains more than 30 IP addresses.
No Response (NGINX)
NGINX drops connection immediately without returning headers to block malicious traffic/bots.
Request Header Too Large (NGINX)
NGINX-specific version of 431 indicating headers exceed memory limits.
SSL Certificate Error (NGINX)
An invalid client SSL certificate was presented to NGINX.
SSL Certificate Required (NGINX)
Client failed to present a required client-side SSL certificate.
HTTP Request Sent to HTTPS Port (NGINX)
An plain-text HTTP request was directed at an HTTPS-encrypted socket.
Client Closed Request (NGINX)
Client terminated connection while NGINX was waiting for upstream response.
Login Timeout (Microsoft IIS)
Client session has expired and user must log in again.
Retry With (Microsoft IIS)
Request cannot be fulfilled because required parameters were omitted.
Web Server Returned Unknown Error (Cloudflare)
Origin server returned an empty, unknown, or unexpected response payload.
Web Server Is Down (Cloudflare)
Origin server refused connection from Cloudflare edge proxy.
Connection Timed Out (Cloudflare)
Cloudflare could not negotiate TCP handshake with origin web server.
Origin Is Unreachable (Cloudflare)
Cloudflare could not reach origin server due to routing or DNS failure.
A Timeout Occurred (Cloudflare)
Cloudflare connected, but origin server took too long to send HTTP response.
SSL Handshake Failed (Cloudflare)
Cloudflare edge network could not negotiate SSL/TLS handshake with origin server.
Invalid SSL Certificate (Cloudflare)
Origin server SSL certificate is untrusted, expired, self-signed, or mismatched.
Railgun Error (Cloudflare)
Connection failed between Cloudflare's Railgun listener and origin server.
Origin DNS Error (Cloudflare)
The requested domain name couldn't be resolved via Cloudflare DNS rules.
No comments:
Post a Comment