Back to all status codes
412
Precondition Failed
The server does not meet one of the preconditions specified in the request headers.
Common Causes
- •If-Match header mismatch
- •If-Unmodified-Since failure
- •ETag mismatch
Fix Solutions
Refresh resource state
Fetch the latest resource and update precondition headers.
Code Examples
# Conditional request with ETag
curl -H 'If-Match: "abc123"' -X PUT https://example.com/resource