428 Precondition Required
Meaning
The origin server requires the request to be conditional. This response is sent to ensure that the client is doing a conditional request (like If-Match) because the resource content might have changed on the server, preventing lost update problems.
When to Use
When an API or server requires that clients include preconditions (usually ETag/If-Match or similar) on methods like PUT to avoid conflicts. If the request isn't conditional, the server rejects it with 428, telling the client to retry with the appropriate precondition headers.
Example
A client attempts to PUT an update to a resource without sending an If-Match header. If the server mandates using ETags to prevent overwriting changes, it responds with 428 Precondition Required to enforce this rule.
When Not to Use
Do not use if the server does not implement conditional update requirements. Also not applicable if the request already had appropriate precondition headers (in which case either process it or use 412 if the conditions fail).
Source
RFC 6585