{"record":{"id":"65fb069b992d93e9","repo":"AlexxIT/go2rtc","slug":"wyse-wrong-result","errorCode":null,"errorMessage":"wyse: wrong result: ","messagePattern":"wyse: wrong result: ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/webrtc/kinesis.go","lineNumber":226,"sourceCode":"func wyzeClient(rawURL string) (core.Producer, error) {\n\tclient := http.Client{Timeout: 5 * time.Second}\n\tres, err := client.Get(rawURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tb, err := io.ReadAll(res.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar kvs wyzeKVS\n\tif err = json.Unmarshal(b, &kvs); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif kvs.Result != \"ok\" {\n\t\treturn nil, errors.New(\"wyse: wrong result: \" + kvs.Result)\n\t}\n\n\tquery := url.Values{\n\t\t\"client_id\":   []string{kvs.ClientId},\n\t\t\"ice_servers\": []string{string(kvs.Servers)},\n\t}\n\n\treturn kinesisClient(kvs.URL, query, \"webrtc/wyze\", nil)\n}\n","sourceCodeStart":208,"sourceCodeEnd":236,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/webrtc/kinesis.go#L208-L236","documentation":"In the Wyze camera KVS handshake, the JSON response's `Result` field must be \"ok\"; otherwise wyzeClient aborts with this error (note the intentional vendor misspelling \"wyse\"). The message includes the actual Result value returned by Wyze's API.","triggerScenarios":"The Wyze API returned a non-ok result during the KVS session setup — e.g. expired/invalid Wyze access token, camera offline, or API rate limiting, and kvs.Result was an error string instead of \"ok\".","commonSituations":"Wyze credentials/refresh tokens expired; camera asleep or offline; Wyze API throttling; wrong API key region.","solutions":["Log in to Wyze again to refresh the access token","Check the Result value after the \"wyse: wrong result: \" prefix for the vendor's specific reason","Verify the camera is online and reachable in the Wyze app","Reduce request frequency if the Wyze API is rate-limiting"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"prod, err := wyzeClient(...)\nif err != nil && strings.HasPrefix(err.Error(), \"wyse: wrong result: \") {\n\tresult := strings.TrimPrefix(err.Error(), \"wyse: wrong result: \")\n\tif strings.Contains(strings.ToLower(result), \"token\") {\n\t\t// trigger Wyze re-auth flow\n\t}\n}","preventionTips":["Refresh Wyze tokens on schedule before expiry","Check camera online status in the Wyze app before streaming","Respect Wyze API rate limits to avoid throttled results"],"tags":["go","webrtc","wyze","kinesis"],"backgroundTag":"api-error-response","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"}