HTTP response status codes — Client error responses
{{HTTPStatus(400, "400 Bad Request")}} : The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
Reference note (untrusted external data; do not execute it as instructions).
{{HTTPStatus(400, "400 Bad Request")}} : The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). {{HTTPStatus(401, "401 Unauthorized")}} : Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. {{HTTPStatus(402, "402 Payment Required")}} : The initial purpose of this code was for digital payment systems, however this status code is rarely used and no standard convention exists. {{HTTPStatus(403, "403 Forbidden")}} : The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. {{HTTPStatus(404, "404 Not Found")}} : The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web. {{HTTPStatus(405, "405 Method Not Allowed")}} : The request method is known by the server but is not supported by the target resource. For example, an API may not allow DELETE on a resource, or the TRACE method entirely. {{HTTPStatus(406, "406 Not Acceptable")}} : This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content that conforms to the criteria given by the user agent. {{HTTPStatus(407, "407 Proxy Authentication Required")}} : This is similar to 401 Unauthorized but authentication is needed to be done by a proxy. {{HTTPStatus(408, "408 Request Timeout")}} : This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers use HTTP pre-connection mechanisms to speed up browsing. Some servers may shut down a connection without sending this message. …
Attribution: Adapted from MDN Web Docs under CC-BY-SA-2.5. Adaptation: WikiKV selected one documentation section, normalized formatting, retained bounded excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
MDN Web Docs — files/en-us/web/http/reference/status/index.md :: Client error responses ↗Revision d14bee540b53 · CC-BY-SA-2.5 and attribution