# 412 Precondition Failed

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

Source: https://apiguide.dev/status-codes/412
Class: client-error
Defined in: RFC 9110, Section 15.5.13 <https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.13>
Updated: 2026-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.
