Loop Detected
5xx Server Error
Last updated:
WebDAV: the server detected an infinite loop while processing the request.
Description
Very rare outside WebDAV property propagation scenarios.
When to use
Return 508 when your server detects a cycle in some recursive operation.
Specification
RFC 5842
Examples
HTTP response
HTTP/1.1 508 Loop Detected
Content-Type: application/json
{"error":"Loop Detected"}Node.js (Express)
res.status(508).json({ error: "Loop Detected" });Go (net/http)
w.WriteHeader(http.Status508)
Python (Flask)
return jsonify({"error": "Loop Detected"}), 508