424 Failed Dependency는 요청이 의존하고 있던 다른 작업이 먼저 실패했기 때문에, 이 요청도 수행할 수 없다는 뜻입니다. WebDAV의 배치·체인 작업에서 앞 단계가 실패하면 그에 의존하는 뒤 단계에 이 코드가 붙습니다.
예를 들어 여러 리소스를 한 번에 처리하는 요청에서 한 리소스가 423 Locked로 실패하면, 그 성공을 전제로 한 다른 작업들은 424로 표시됩니다. 대개 207 Multi-Status 응답 안에서 개별 항목의 상태로 나타납니다.
COPY /a/locked.txt HTTP/1.1
Host: dav.example.com
Destination: /b/copy.txt
(part of a batch where a prior action failed)HTTP/1.1 207 Multi-Status
Content-Type: application/xml
<D:multistatus xmlns:D="DAV:"><D:response><D:status>HTTP/1.1 424 Failed Dependency</D:status></D:response></D:multistatus>// If an earlier step failed, mark the dependent step 424 in a batch
for (const step of batch) {
if (previousFailed) {
results.push({ step: step.id, status: 424 });
continue;
}
const ok = run(step);
if (!ok) previousFailed = true;
}