What 428 means
To prevent lost updates, the server insists on an If-Match header (with the resource's ETag) for changes.
Common causes
- Updating without sending If-Match.
How to fix it
If you're calling an API
- GET the resource, then send its ETag in If-Match with your update.
If you run the server
- Document which endpoints require If-Match.
Should you retry?
With an If-Match header.
Example response
HTTP/1.1 428 Precondition Required
Content-Type: application/problem+json
{
"type": "about:blank",
"title": "Precondition Required",
"status": 428,
"detail": "The server requires a conditional request."
}Related headers: If-Match, ETag.
Defined in: RFC 6585. 428 is a client error: change the request before retrying.
Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.