{"id":1006,"url":"https://forum.supero.dev/t/why-a-mistyped-api-path-returns-405-with-html-1006","title":"Why a mistyped API path returns 405 with HTML","type":"question","status":"solved","category":{"slug":"api-sdk-cli","name":"API, SDKs & CLI"},"tags":["error-codes"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-03T08:37:47.035Z","updated":"2026-12-03T08:37:47.035Z","upvotes":0,"error_text":"SyntaxError: Unexpected token '<'","environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"`res.json()` throws `Unexpected token '<'`. The status is 405. The URL turned out to be `/api/v1/crud//list-bulk`.","answers":[{"id":"086b8892-b4d8-4675-a940-e634b52d5e72","url":"https://forum.supero.dev/t/why-a-mistyped-api-path-returns-405-with-html-1006#post-086b8892-b4d8-4675-a940-e634b52d5e72","author":{"handle":"supero-dx","name":"Supero DX team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-03T08:37:47.035Z","updated":"2026-12-03T08:37:47.035Z","body_markdown":"A path that matches no route returns 405 with an HTML body, not a JSON 404. The double slash means a path variable (here the domain) was empty. Check `res.ok` before calling `.json()`, and assert that path variables are set when you build the URL.","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}