424 Failed Dependency: Cascading Failure in Batch Operations
How 424 Works in WebDAV
WebDAV batch operations (like PROPFIND, PROPPATCH, or multi‑resource operations) can include multiple sub‑requests. If one sub‑request fails, the server may mark dependent sub‑requests as "failed dependency" and return 424 for them. The overall response is 207 Multi-Status, which contains a list of response elements, each with its own status code.
For example, a batch operation might:
- Lock a resource (succeeds).
- Copy the resource (depends on the lock, fails with 423 if lock fails).
- Delete the original (depends on the copy, gets 424 if the copy fails).
Common Causes of 424 Errors
| Cause | Example | How to Fix |
|---|---|---|
| Previous sub‑request failed | Source file is locked (423) before a move operation. | Fix the previous error first (e.g., unlock the source). |
| Authentication failure in a prior step | First request returns 401, subsequent requests get 424. | Provide valid credentials for all steps. |
| Resource conflict | A later step depends on a resource that was deleted in an earlier failed step. | Retry the batch after resolving the conflict. |
| Server logic error | Server incorrectly marks a dependency as failed. | Check server logs and fix the batch processing logic. |
Example: 207 Multi-Status with 424
A client tries to copy a file and then delete the original, but the copy fails:
How to Fix 424 Errors
- If you're a client developer: Parse the 207 Multi-Status response to identify which previous operation failed. Fix that error (e.g., unlock the resource, provide authentication, resolve conflicts) and retry the entire batch.
- If you're a server developer: Ensure your batch processing logic correctly tracks dependencies and returns 424 only when a prior operation truly failed. Provide clear error messages inside the 207 response.
- If you're an end‑user: This error is extremely rare outside WebDAV clients. Contact the system administrator.
Related WebDAV Codes
- 207 Multi-Status – the container that holds multiple statuses.
- 423 Locked – resource is locked.
- 409 Conflict – conflict with the current state.
- 507 Insufficient Storage – server out of space.
Frequently Asked Questions
Is 424 a client error or a server error?
It's a client error (4xx) because the client's batch request contains a dependency that failed. The failure is due to a prior client error (e.g., locking, authentication), not a server malfunction.
Can 424 be used outside of WebDAV?
It's defined in WebDAV and is rarely used elsewhere. Some REST APIs may use it for batch operations, but it's more common to return a 400 or 422 with a detailed error body.
What should I do if I receive a 424 and no 207 Multi-Status?
This would be a violation of the specification. The server should always include a 207 Multi-Status body with the details of the failure. Check your server logs or contact the developer.