{"record":{"id":"1bc96bf8fd53b8bf","repo":"AlexxIT/go2rtc","slug":"res-status-1bc96b","errorCode":null,"errorMessage":"${res.Status}","messagePattern":"\\$\\{res\\.Status\\}","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/tapo/client.go","lineNumber":103,"sourceCode":"\n\tquery := c.url.Query()\n\n\tif deviceId := query.Get(\"deviceId\"); deviceId != \"\" {\n\t\treq.URL.RawQuery = \"deviceId=\" + deviceId\n\t}\n\n\treq.Header.Set(\"Content-Type\", \"multipart/mixed; boundary=--client-stream-boundary--\")\n\n\tusername := c.url.User.Username()\n\tpassword, _ := c.url.User.Password()\n\n\tconn, res, err := dial(req, c.url.Scheme, username, password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif res.StatusCode != http.StatusOK {\n\t\treturn nil, errors.New(res.Status)\n\t}\n\n\tif c.decrypt == nil {\n\t\tc.newDectypter(res, c.url.Scheme, username, password)\n\t}\n\n\tchannel := query.Get(\"channel\")\n\tif channel == \"\" {\n\t\tchannel = \"0\"\n\t}\n\n\tsubtype := query.Get(\"subtype\")\n\tswitch subtype {\n\tcase \"\", \"0\":\n\t\tsubtype = \"HD\"\n\tcase \"1\":\n\t\tsubtype = \"VGA\"\n\t}","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/tapo/client.go#L85-L121","documentation":"Tapo newConn HTTP status guard: the multipart stream request to the camera returned a status other than 200 (res.Status becomes the message, e.g. '401 Unauthorized'). The stream channel could not be opened; auth failures and camera-side errors are the usual causes.","triggerScenarios":"Thrown at pkg/tapo/client.go:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["For 401: verify the Tapo account password / cloud credentials in the URL","For 404: check the stream path and channel query parameter","Retry after the camera reboots if it returns 5xx"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}