HTTP 412 Precondition Failed vs 425 Too Early
Both HTTP 412 (Precondition Failed) and 425 (Too Early) belong to the 4xx Client Error category. 412 indicates that one or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false. Meanwhile, 425 means that the server is unwilling to risk processing a request that might be replayed. Used with TLS 1.3 early data (0-RTT).
Description
One or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false.
When You See It
When using conditional requests with ETags and the resource has changed.
How to Fix
Refresh the ETag/Last-Modified value and retry with updated preconditions.
Description
The server is unwilling to risk processing a request that might be replayed. Used with TLS 1.3 early data (0-RTT).
When You See It
When a server rejects a request sent as TLS 1.3 early data due to replay risk.
How to Fix
Retry the request after the TLS handshake completes.
Key Differences
HTTP 412: One or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false.
HTTP 425: The server is unwilling to risk processing a request that might be replayed. Used with TLS 1.3 early data (0-RTT).
You encounter 412 when when using conditional requests with ETags and the resource has changed.
You encounter 425 when when a server rejects a request sent as TLS 1.3 early data due to replay risk.
When to Use Which
For 412 (Precondition Failed): Refresh the ETag/Last-Modified value and retry with updated preconditions. For 425 (Too Early): Retry the request after the TLS handshake completes.