{"record":{"id":"da31be2bb96d9fdf","repo":"AlexxIT/go2rtc","slug":"wyze-account-not-found-s","errorCode":null,"errorMessage":"wyze: account not found: %s","messagePattern":"wyze: account not found: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/wyze/wyze.go","lineNumber":45,"sourceCode":"\t}\n\tapp.LoadConfig(&v)\n\n\taccounts = v.Cfg\n\n\tlog := app.GetLogger(\"wyze\")\n\n\tstreams.HandleFunc(\"wyze\", func(rawURL string) (core.Producer, error) {\n\t\tlog.Debug().Msgf(\"wyze: dial %s\", rawURL)\n\t\treturn wyze.NewProducer(rawURL)\n\t})\n\n\tapi.HandleFunc(\"api/wyze\", apiWyze)\n}\n\nfunc getCloud(email string) (*wyze.Cloud, error) {\n\tcfg, ok := accounts[email]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"wyze: account not found: %s\", email)\n\t}\n\n\tif cfg.APIKey == \"\" || cfg.APIID == \"\" {\n\t\treturn nil, fmt.Errorf(\"wyze: api_key and api_id required for account: %s\", email)\n\t}\n\n\tcloud := wyze.NewCloud(cfg.APIKey, cfg.APIID)\n\n\tif err := cloud.Login(email, cfg.Password); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn cloud, nil\n}\n\nfunc apiWyze(w http.ResponseWriter, r *http.Request) {\n\tswitch r.Method {\n\tcase \"GET\":","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/wyze/wyze.go#L27-L63","documentation":"getCloud is asked for a Wyze cloud client keyed by email, but the accounts map (loaded from config) has no entry with that address. Signals misconfiguration — the account was never configured or the email is misspelled — before any API key checks are made.","triggerScenarios":"Thrown at internal/wyze/wyze.go:45 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call the api/wyze auth endpoint first to store the account in config","Check the email spelling matches the configured account","Ensure the config file was loaded and contains the wyze section"],"exampleFix":null,"handlingStrategy":"validation","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"}