The HTTP 400 status code, named Bad Request, means the server cannot or will not process a request because of something it perceives to be a client error, according to RFC 9110, the IETF standard that defines HTTP semantics.
What RFC 9110 says about 400 Bad Request
Section 15.5.1 of RFC 9110 defines the code in one sentence: "The 400 (Bad Request) status code indicates that 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)."
The examples in that definition are:
- malformed request syntax
- invalid request message framing
- deceptive request routing
What the 4xx class means
RFC 9110 says the first digit of a status code defines its class, and that the 4xx (Client Error) class indicates that the client seems to have erred. The same standard says that, except when responding to a HEAD request, the server should send a representation explaining the error and whether it is temporary or permanent, and that user agents should display that representation to the user.