HTTP

HTTP 424 Failed Dependency vs 428 Precondition Required

Both HTTP 424 (Failed Dependency) and 428 (Precondition Required) belong to the 4xx Client Error category. 424 indicates that the request failed because it depended on another request that failed (WebDAV). Meanwhile, 428 means that the server requires the request to be conditional (e.g., include If-Match header) to prevent lost updates.

Description

The request failed because it depended on another request that failed (WebDAV).

When You See It

In batch WebDAV operations when a prerequisite action fails.

How to Fix

Fix the failed dependency first, then retry the operation.

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.

Key Differences

1.

HTTP 424: The request failed because it depended on another request that failed (WebDAV).

2.

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

3.

You encounter 424 when in batch WebDAV operations when a prerequisite action fails.

4.

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

When to Use Which

For 424 (Failed Dependency): Fix the failed dependency first, then retry the operation. For 428 (Precondition Required): Fetch the resource first to get its ETag, then include If-Match in your update request.

Learn More