HTTP 412 Precondition Failed — What It Means

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

Published September 24, 2026

HTTP 412 Precondition Failed — A precondition in the request's headers wasn't met.

Key points

  • Returned when a conditional header like If-Match or If-Unmodified-Since doesn't match the resource's current state
  • Commonly used to prevent a client from overwriting changes someone else made since it last read the resource
  • Part of implementing optimistic concurrency control over HTTP
More HTTP articles