HTTP 428 Precondition Required — What It Means

What HTTP status code 428 Precondition Required means, when servers return it, and how to handle it correctly.

Published September 25, 2026

HTTP 428 Precondition Required means the server requires the request to be conditional (using If-Match, for example) to prevent lost updates.

What it means

It forces clients to include a precondition so concurrent edits do not overwrite each other.

Common causes: PUT without If-Match; Strict optimistic concurrency; APIs protecting against lost updates.

On the wire

PUT /docs/7 HTTP/1.1
HTTP/1.1 428 Precondition Required
If-Match: "v3"
A typical 428 exchange.

Practical examples

Test it from the shell

curl -i https://example.com/path   # look for HTTP 428

Handling 428 in code or config

if (!req.get('If-Match')) return res.sendStatus(428)

How to fix it

Send If-Match with the ETag; Fetch the latest version first; Retry the update.

1. Reproduce: curl -i <url>
2. Confirm the status is 428
3. Apply the fix above and re-test

Common mistakes

  • Send If-Match with the ETag
  • Fetch the latest version first
  • Ignoring the response headers that explain the details.

Key takeaways

  • 428 means Precondition Required.
  • HTTP 428 Precondition Required means the server requires the request to be conditional (using If-Match, for example) to prevent lost updates.
  • Read the response headers and logs for the exact cause.

FAQ

Why would a server require it?

To prevent the lost-update problem.

Is 428 a client or server error?

It is a client error status code, in the 4xx class.

More HTTP articles