HTTP

HTTP 428 Precondition Required vs 451 Unavailable For Legal Reasons

Both HTTP 428 (Precondition Required) and 451 (Unavailable For Legal Reasons) 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, 451 means that the server is denying access to the resource as a consequence of a legal demand. Named after Ray Bradbury's Fahrenheit 451.

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

The server is denying access to the resource as a consequence of a legal demand. Named after Ray Bradbury's Fahrenheit 451.

When You See It

When content is blocked due to court orders, GDPR requests, or government censorship.

How to Fix

No technical fix. The block is legally mandated. Contact the site operator for details.

Key Differences

1.

HTTP 428: The server requires the request to be conditional (e.g., include If-Match header) to prevent lost updates.

2.

HTTP 451: The server is denying access to the resource as a consequence of a legal demand. Named after Ray Bradbury's Fahrenheit 451.

3.

You encounter 428 when when an API requires optimistic concurrency control via ETags.

4.

You encounter 451 when when content is blocked due to court orders, GDPR requests, or government censorship.

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 451 (Unavailable For Legal Reasons): No technical fix. The block is legally mandated. Contact the site operator for details.

Learn More