HTTP status codes / 4xx — Client errors
412 Precondition Failed
An If-* conditional header did not hold.
What it means
You made the request conditional (If-Match, If-Unmodified-Since…) and the condition failed — the standard signal in optimistic concurrency that someone changed the resource before you.
Common causes
- If-Match ETag is stale — the resource changed since you read it
- If-Unmodified-Since older than the last edit
Reproduce it in cURL
curl -i -H 'If-Match: "wrong-etag"' -X PUT https://httpbin.org/put
Same request, no terminal: paste this into the cURL converter for native code, or straight into ReqPad on your phone.
How to debug it
Refetch to get the current ETag, merge your changes, retry with the new If-Match.
Server-side note: This is optimistic concurrency working as designed: refetch, reapply your change, retry with the new ETag.
The fastest way to pin down a 412 is to reproduce the exact request and inspect what actually went over the wire — status, headers, timing and body, without your app code in the way. That is what an API client is for; ReqPad does it from your phone, with every request saved to history.
Related codes
400 Bad Request · 401 Unauthorized · 402 Payment Required · 403 Forbidden · 404 Not Found · 405 Method Not Allowed — or the full reference.
Reproduce that 412 in 10 seconds.
Build the request, send it, read status + headers + timing — on your iPhone. Free to start.