413 Payload Too Large β
Meaning β
The request entity is larger than the server is willing or able to process. Previously called "Request Entity Too Large."
When to Use β
When the client sends a request body that is larger than the serverβs limits or capabilities (e.g., uploading a file exceeding max size).
Example β
Uploading a 50 MB file to a server that only accepts up to 10 MB returns 413 Payload Too Large, indicating the request size exceeds the allowed limit.
When Not to Use β
Do not use if the problem is not size-related (for example, if the content is the wrong type, use 415, or if there's a semantic issue, 422). Also do not use if the server will stream or handle large payloads by design.
Source β
RFC 9110