424 Failed Dependency
Usage
The 424 Failed Dependency error is part of Webdav, used as a file system over HTTP. When this error is received, the code appears inside the message body as part of a 207 Multi-Status response. This is an example where a successful response contains an indication of failure.
The client is responsible for parsing the multi-status response and upon discovering 424 Failed Dependency errors, determining the issue and resolving accordingly.
This status is encountered during a PROPPATCH action, where several properties are modified at one time in a single HTTP request. Generally, an HTTP request either succeeds or fails. If one of the properties fails to set, the entire request fails. For the properties set successfully before the failure, the 424 Failed Dependency status is used.
Example
The client submits a request to update seat numbers and the name for a conference registration record. After initial registration, seats are added, removed, or changed. No modifications to the name are allowed. Because the name change is denied with 403 Forbidden, the entire request is denied, meaning updates to seating arrangements are not completed.
Request
PROPPATCH /update.html HTTP/1.1
Host: example.com
Content-Type: application/xml; charset="utf-8"
Content-Length: 305
<?xml version="1.0" encoding="utf-8" ?>
<d:propertyupdate xmlns:d="DAV:"
xmlns:z="urn:example">
<d:set>
<d:prop>
<z:seats>
<z:seatnumber>100</z:seatnumber>
<z:seatnumber>101</z:seatnumber>
</z:seats>
</d:prop>
<d:prop>
<d:name>Smith</d:name>
</d:prop>
</d:set>
</d:propertyupdate>
Response
HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8"
Content-Length: 528
<?xml version="1.0" encoding="utf-8" ?>
<d:multistatus xmlns:d="DAV:"
xmlns:z="urn:example">
<d:response>
<d:href>
http://example.com/registrants/update.html
</d:href>
<d:propstat>
<d:prop><z:seats/></d:prop>
<d:status>
HTTP/1.1 424 Failed Dependency
</d:status>
</d:propstat>
<d:propstat>
<d:prop><z:name/></d:prop>
<d:status>HTTP/1.1 403 Forbidden</d:status>
</d:propstat>
<d:responsedescription>
The name of the registrant is not modifiable.
</d:responsedescription>
</d:response>
</d:multistatus>
How to fix
Parse the 207 Multi-Status response body and locate the sub-request with a non-424 failure code. The 424 entries are cascading failures. The root cause is the operation with a different error such as 403, 409, or 423.
Fix the root-cause operation first. In a PROPPATCH request, a single property update failing with 403 Forbidden causes all other property updates in the same request to fail with 424. Resolve the forbidden property (remove the offending field or correct permissions), then retry the entire PROPPATCH.
Check for resource locks. A 423 Locked status on one sub-request cascades as 424 to every other operation in the batch. Unlock the resource or include the correct lock token in the If header before retrying.
Order matters in some Webdav implementations. Place independent operations first and dependent ones last so partial failures affect fewer items.
Split large batch requests into smaller groups when debugging. Isolating individual operations makes the true failing dependency visible without parsing a complex multi-status response.
On the server side, return descriptive error messages in each <d:responsedescription> element so clients identify the failing property or resource without guessing.
Code references
.NET
HttpStatusCode.FailedDependency
Rust
http::StatusCode::FAILED_DEPENDENCY
Rails
:failed_dependency
Go
http.StatusFailedDependency
Symfony
Response::HTTP_FAILED_DEPENDENCY
Python3.5+
http.HTTPStatus.FAILED_DEPENDENCY
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_FAILED_DEPENDENCY
Angular
@angular/common/http/HttpStatusCode.FailedDependency