{"record":{"id":"0d66982852a6624e","repo":"AlexxIT/go2rtc","slug":"wyze-api-error-s-s","errorCode":null,"errorMessage":"wyze: API error: %s - %s","messagePattern":"wyze: API error: (.+?) - (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wyze/cloud.go","lineNumber":191,"sourceCode":"\n\tresp, err := c.client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar result deviceListResponse\n\tif err := json.Unmarshal(body, &result); err != nil {\n\t\treturn nil, fmt.Errorf(\"wyze: failed to parse device list: %w\", err)\n\t}\n\n\tif result.Code != \"1\" {\n\t\treturn nil, fmt.Errorf(\"wyze: API error: %s - %s\", result.Code, result.Msg)\n\t}\n\n\tc.cameras = nil\n\tfor _, dev := range result.Data.DeviceList {\n\t\tif dev.ProductType != \"Camera\" {\n\t\t\tcontinue\n\t\t}\n\t\tif dev.DeviceParams.IP == \"\" {\n\t\t\tcontinue // skip cameras without IP (gwell protocol)\n\t\t}\n\n\t\tc.cameras = append(c.cameras, &Camera{\n\t\t\tMAC:          dev.MAC,\n\t\t\tP2PID:        dev.DeviceParams.P2PID,\n\t\t\tENR:          dev.ENR,\n\t\t\tIP:           dev.DeviceParams.IP,\n\t\t\tNickname:     dev.Nickname,\n\t\t\tProductModel: dev.ProductModel,","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/wyze/cloud.go#L173-L209","documentation":"The Wyze device-list API returned a result code other than '1' (success), so the request logically failed despite an HTTP response. The code and message from the API are surfaced; raised in GetCameraList (also via GetCamera).","triggerScenarios":"Thrown at pkg/wyze/cloud.go:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-login to refresh the access token","Check the specific code/message and correct request parameters","Retry on transient service errors"],"exampleFix":null,"handlingStrategy":"retry","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"}