What does HTTP status 428 (Precondition Required) mean?

 
Previous Next
HTTP_STATUS_UPGRADE_REQUIRED HTTP_STATUS_TOO_MANY_REQUESTS

HTTP_STATUS_PRECONDITION_REQUIRED

A server uses 428 to force clients to make a request conditional, typically with If-Match and an ETag. This prevents a stale client from overwriting a newer representation it never read.

Fetch the current resource, retain its validator, and submit the update with the required condition. Do not replace the conditional request with an unconditional write merely to avoid 428.

RFC 6585: Additional HTTP Status Codes

Operational meaning of HTTP 428 for HTTP_STATUS_PRECONDITION_REQUIRED

HTTP 428 (HTTP_STATUS_PRECONDITION_REQUIRED) is a client-error response. AllStat records its meaning as “428 Precondition Required”. For HTTP_STATUS_PRECONDITION_REQUIRED, interpret it with the request method, selected representation, response headers, and the specification or product that defines the code; the number alone does not prove that application work completed.

Client and server handling for HTTP_STATUS_PRECONDITION_REQUIRED

  • Treat HTTP_STATUS_PRECONDITION_REQUIRED as a condition visible at the request boundary; inspect authentication, syntax, preconditions, routing, and resource state before retrying.
  • For HTTP_STATUS_PRECONDITION_REQUIRED, preserve the response body and challenge or retry-related headers because they often carry the actionable reason.
  • For HTTP_STATUS_PRECONDITION_REQUIRED, automatic retry is safe only when the method and status contract allow it and the request has been corrected.

For telemetry, record HTTP 428, method, authority, route template rather than secrets, response headers relevant to caching or retry, latency, upstream identity, and whether the response originated at the application or an intermediary.


Looking for a different code? Search another status or error code.