Skip to main content

Client Error (4xx)

HTTP/1.1

412 Precondition Failed

One or more preconditions in the request headers evaluated to false.

CategoryClient Error (4xx)
API error types1 error schema
Related headers5 headers
Updated2026-07-09

What does HTTP status code 412 mean?

The 412 Precondition Failed status code indicates that one or more conditional checks specified in the client’s request headers (like If-Match) failed.

When to use it in APIs

Used in conditional updates. A client submits a PUT request with If-Match: "etag_value". If the resource ETag has changed on the server, the server returns 412 to prevent the client from overwriting concurrent changes.

How it compares to other codes

  • 409 Conflict: A general state conflict. 412 is strictly tied to HTTP headers-based optimistic concurrency control.

Problem types for 412

1