DevToolPal
EN
4xx Client errors

428 Precondition Required

What it means

The server requires the request to be conditional (If-Match etc.) to prevent lost updates.

Common causes

  • PUT or PATCH without If-Match on an API that enforces optimistic locking

How to fix it

As a client or visitor

GET the resource, take its ETag, and send it in If-Match with your update.

As the site or API owner

Explain in the body which header is required.

Example response

HTTP/1.1
HTTP/1.1 428 Precondition Required
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Precondition Required",
  "status": 428,
  "detail": "Send If-Match with the ETag you last read."
}

Specification

RFC 6585 §3

FAQ

› Why would an API require If-Match?

To prevent two clients from overwriting each other's changes without noticing.

› 428 vs 412?

428: no precondition was sent. 412: one was sent but failed.