HTTP 428 Precondition Required vs 499 Client Closed Request
Both HTTP 428 (Precondition Required) and 499 (Client Closed Request) belong to the 4xx Client Error category. 428 indicates that the server requires the request to be conditional (e.g., include If-Match header) to prevent lost updates. Meanwhile, 499 means that a non-standard status code used by Nginx when the client closes the connection before the server responds.
Description
The server requires the request to be conditional (e.g., include If-Match header) to prevent lost updates.
When You See It
When an API requires optimistic concurrency control via ETags.
How to Fix
Fetch the resource first to get its ETag, then include If-Match in your update request.
Description
A non-standard status code used by Nginx when the client closes the connection before the server responds.
When You See It
In Nginx logs when clients timeout or navigate away before receiving the response.
How to Fix
Optimize server response times. Check for slow upstream services.
Key Differences
HTTP 428: The server requires the request to be conditional (e.g., include If-Match header) to prevent lost updates.
HTTP 499: A non-standard status code used by Nginx when the client closes the connection before the server responds.
You encounter 428 when when an API requires optimistic concurrency control via ETags.
You encounter 499 when in Nginx logs when clients timeout or navigate away before receiving the response.
When to Use Which
For 428 (Precondition Required): Fetch the resource first to get its ETag, then include If-Match in your update request. For 499 (Client Closed Request): Optimize server response times. Check for slow upstream services.