HTTP 4xx Client Error Status Codes

Client error responses like 400, 401, 403, 404, 409, 422, and 429.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Codes 400-409

Reference entries for HTTP 400-409 responses.

HTTP 400 Bad Request

Malformed or invalid request

textANYhttpstatus-code4xxhttp-400
text
curl -i -X POST https://example.com/api -H 'Content-Type: application/json' -d '{bad json}'

Typically caused by malformed syntax, invalid framing, or deceptive routing.

HTTP 401 Unauthorized

Authentication required or invalid

textANYhttpstatus-code4xxhttp-401
text
curl -i https://example.com/private

Usually returned when credentials are missing, expired, or invalid. `WWW-Authenticate` is commonly involved.

HTTP 402 Payment Required

Reserved / rarely used

textANYhttpstatus-code4xxhttp-402
text
HTTP/1.1 402 Payment Required

Historically reserved; sometimes reused by APIs for billing or quota semantics.

HTTP 403 Forbidden

Authenticated but not allowed

textANYhttpstatus-code4xxhttp-403
text
curl -i -H 'Authorization: Bearer token' https://example.com/admin

The server understood the request but refuses access.

HTTP 404 Not Found

Resource does not exist

textANYhttpstatus-code4xxhttp-404
text
curl -i https://example.com/does-not-exist

Common when a route or object is missing.

HTTP 405 Method Not Allowed

Method not supported on target resource

textANYhttpstatus-code4xxhttp-405
text
curl -i -X PATCH https://example.com/static-page

Typically accompanied by an `Allow` header listing permitted methods.

HTTP 406 Not Acceptable

No acceptable representation available

textANYhttpstatus-code4xxhttp-406
text
curl -i -H 'Accept: application/xml' https://example.com/json-only

Occurs when content negotiation cannot satisfy the `Accept` headers.

HTTP 407 Proxy Authentication Required

Proxy requires authentication

textANYhttpstatus-code4xxhttp-407
text
curl -x http://proxy.example.com:8080 https://example.com

Like `401` but for authenticating with a proxy.

HTTP 408 Request Timeout

Server timed out waiting for request

textANYhttpstatus-code4xxhttp-408
text
HTTP/1.1 408 Request Timeout

Often indicates the client was too slow sending the request.

HTTP 409 Conflict

Request conflicts with current state

textANYhttpstatus-code4xxhttp-409
text
curl -i -X PUT https://example.com/api/items/1 -H 'If-Match: "stale-etag"' -d '{"x":1}'

Common with version conflicts, duplicate creates, or edit collisions.

Codes 410-421

Reference entries for HTTP 410-421 responses.

HTTP 410 Gone

Resource intentionally removed

textANYhttpstatus-code4xxhttp-410
text
curl -i https://example.com/removed

Like 404, but with stronger intent that the resource is gone permanently.

HTTP 411 Length Required

Missing required Content-Length

textANYhttpstatus-code4xxhttp-411
text
curl -i -X POST https://example.com/upload --data-binary @file.bin

The server refuses the request without a defined content length.

HTTP 412 Precondition Failed

Conditional request condition not met

textANYhttpstatus-code4xxhttp-412
text
curl -i -X PUT https://example.com/item/1 -H 'If-Match: "wrong"' -d '{"a":1}'

Often used with `If-Match`, `If-Unmodified-Since`, or similar headers.

HTTP 413 Content Too Large

Payload too large

textANYhttpstatus-code4xxhttp-413
text
curl -i -X POST https://example.com/upload --data-binary @huge.tar

Returned when the request body exceeds server limits.

HTTP 414 URI Too Long

Request target too long

textANYhttpstatus-code4xxhttp-414
text
curl -i 'https://example.com/search?q=very-long-string'

Often caused by oversized query strings or redirect loops.

HTTP 415 Unsupported Media Type

Request body media type not supported

textANYhttpstatus-code4xxhttp-415
text
curl -i -X POST https://example.com/api -H 'Content-Type: text/plain' -d 'name=ada'

Typical when sending JSON without `Content-Type: application/json` or sending the wrong media type.

HTTP 416 Range Not Satisfiable

Requested byte range is invalid

textANYhttpstatus-code4xxhttp-416
text
curl -i -H 'Range: bytes=99999999-999999999' https://example.com/file.zip

Used when a range is outside the current representation length.

HTTP 417 Expectation Failed

Expectation cannot be met

textANYhttpstatus-code4xxhttp-417
text
curl -i -H 'Expect: some-unknown-expectation' https://example.com

Often associated with unsupported `Expect` semantics.

HTTP 418 I'm a teapot

Humorous / non-standard in practice

textANYhttpstatus-code4xxhttp-418
text
HTTP/1.1 418 I'm a teapot

Known from RFC 2324; commonly referenced humorously in developer contexts.

HTTP 421 Misdirected Request

Request sent to wrong origin/server

textANYhttpstatus-code4xxhttp-421
text
curl -i https://example.com

Defined for HTTP/2 scenarios where the connection was reused for the wrong authority.

Codes 422-451

Reference entries for HTTP 422-451 responses.

HTTP 422 Unprocessable Content

Semantically invalid content

textANYhttpstatus-code4xxhttp-422
text
curl -i -X POST https://example.com/api/users -H 'Content-Type: application/json' -d '{"email":"not-an-email"}'

Common for validation errors in APIs where JSON is syntactically valid but semantically invalid.

HTTP 423 Locked

Resource is locked

textANYhttpstatus-code4xxhttp-423
text
LOCK /webdav/file.txt HTTP/1.1

Often associated with WebDAV-style locking semantics.

HTTP 424 Failed Dependency

Dependent action failed

textANYhttpstatus-code4xxhttp-424
text
PROPPATCH /webdav/resource HTTP/1.1

One requested action failed because another failed.

HTTP 425 Too Early

Replay-risk request rejected

textANYhttpstatus-code4xxhttp-425
text
HTTP/1.1 425 Too Early

Used to avoid processing a request that could be replayed too early.

HTTP 426 Upgrade Required

Client must switch protocol

textANYhttpstatus-code4xxhttp-426
text
HTTP/1.1 426 Upgrade Required
Upgrade: h2c

The server requires a protocol upgrade before continuing.

HTTP 428 Precondition Required

Conditional request required

textANYhttpstatus-code4xxhttp-428
text
HTTP/1.1 428 Precondition Required

Common to force safe updates and avoid lost updates. RFC 6585 defines it.

HTTP 429 Too Many Requests

Rate limit exceeded

textANYhttpstatus-code4xxhttp-429
text
curl -i https://api.example.com/v1/search

The canonical response for rate limiting. RFC 6585 defines it.

HTTP 431 Request Header Fields Too Large

Headers are too large

textANYhttpstatus-code4xxhttp-431
text
curl -i -H 'Cookie: huge=...' https://example.com

Often caused by oversized cookies or custom headers.

HTTP 451 Unavailable For Legal Reasons

Blocked for legal reasons

textANYhttpstatus-code4xxhttp-451
text
HTTP/1.1 451 Unavailable For Legal Reasons

Defined for resources blocked because of legal demands.

Recommended next

No recommendations yet.