HTTP 424 Failed Dependency is a WebDAV extension (RFC 4918) indicating the request failed because it depended on another request that also failed. This occurs in batch operations where an action on one resource requires a prior action on another resource to succeed. If the dependency fails, all dependent operations return 424. Think of it as cascading failure reporting in a multi-step operation.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/424
Example request:
curl -i "https://httpstatus.com/api/status/424"The request failed because it depended on another request and that request failed.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
HTTP 424 Failed Dependency has specific technical implications for API design, caching, and client behavior. Understanding the precise semantics helps distinguish it from similar status codes and implement correct error handling. The response should include a descriptive body following a consistent error schema (like RFC 7807 Problem Details) so clients can programmatically handle the error.
// Handle 424 Failed Dependency in Express
app.use((err, req, res, next) => {
if (err.status === 424) {
return res.status(424).json({
type: 'https://api.example.com/errors/failed-dependency',
title: 'Failed Dependency',
status: 424,
detail: err.message
});
}
next(err);
});from fastapi import HTTPException
# Raise 424 Failed Dependency
raise HTTPException(
status_code=424,
detail={
'type': 'failed_dependency',
'message': 'Descriptive error for 424 Failed Dependency'
}
)// Spring Boot 424 Failed Dependency handling
@ExceptionHandler(CustomFailedDependencyException.class)
public ResponseEntity<ErrorResponse> handleFailedDependency(
CustomFailedDependencyException ex) {
return ResponseEntity.status(424)
.body(new ErrorResponse("Failed Dependency", ex.getMessage()));
}// Return 424 Failed Dependency
func errorHandler(w http.ResponseWriter, message string) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(424)
json.NewEncoder(w).Encode(map[string]any{
"status": 424,
"error": "Failed Dependency",
"message": message,
})
}