A 428 Precondition Required error indicates that the origin server requires the request to be conditional.
Its primary purpose is to prevent the “lost update” problem, where Client A fetches a resource, Client B fetches the same resource, Client B updates it, and then Client A inadvertently overwrites Client B’s changes because neither request was conditional.
Determining why
The server’s API rules state that any modification (PUT, PATCH, DELETE) must include conditional headers such as If-Match with the current ETag. Because your request omitted the required precondition header, the server safely rejected it.
Steps you could possibly take:
- Fetch the latest resource state - Perform a
GETrequest to obtain the current version and itsETagresponse header. - Include the precondition header - Re-send your modification request including
If-Match: "<etag>"orIf-Unmodified-Since.