🎯
424
Failed Dependency
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 424 Failed Dependency
Common Causes
  • WebDAV method failed due to prior failure
  • Dependent operation unsuccessful
  • Cascading failure in batch request
Technical Details

What does this mean?

Domino effect! A previous request in the chain failed, so this one can't proceed. Fix the first problem first!

Technical Definition

The request failed because it depended on another request that failed.

RFC Says

"The 424 (Failed Dependency) status code means that the method could not be performed on the resource because the requested action depended on another action and that action failed."

Plain English:

424 means 'I couldn't do what you asked because something else you requested in the same batch operation failed.' This is from WebDAV and is used in multi-status operations where one operation depends on another. If the first operation fails, dependent operations return 424.

Common Misinterpretation

This is specific to WebDAV batch operations. Don't use it in typical REST APIs. If your API operation fails because of a downstream dependency (like a database or external API), use 500, 502, or 503 instead depending on the situation.

Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(424).json({
    error: 'Failed Dependency',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(424, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Failed Dependency',
    message: 'Your error message here'
  }));
}).listen(3000);