What 508 Loop Detected means
508 Loop Detected is another WebDAV code. The server detected that processing the request would create an infinite loop (e.g. circular symlinks, recursive PROPFIND on cyclic resource graph). Outside WebDAV, 508 is occasionally used by APIs to signal recursion-depth-exceeded errors.
When servers should return it: Return 508 when a request would cause infinite recursion or self-reference.
Example response
HTTP/2 508
content-type: application/json
{"error":"loop detected","depth":1024}
More references
For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.