4xx Client error

HTTP 412 Precondition Failed

A condition in the request headers, such as If-Match, evaluated to false.

412 Precondition Failed means a condition the client set in its headers, such as If-Match or If-Unmodified-Since, is no longer true, so the server refused to apply the request.

HTTP/1.1 412 Precondition Failed

Common causes

  • An update sent with If-Match: "etag" after someone else changed the resource.
  • Conditional uploads to object storage that guard against overwriting.

How to fix it

  • Fetch the resource again to get its current ETag, merge your change and retry.
  • This is optimistic concurrency working as intended: it prevents lost updates.

Related status codes

Other status codes

1xx Informational

2xx Success

3xx Redirection

5xx Server error

Search all HTTP status codes