{"record":{"id":"f5061dedb5587cb8","repo":"AlexxIT/go2rtc","slug":"yandex-login-error-s","errorCode":null,"errorMessage":"yandex: login error: %s","messagePattern":"yandex: login error: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/yandex/session.go","lineNumber":69,"sourceCode":"\treq.Header.Set(\"Content-Type\", \"application/x-www-form-urlencoded\")\n\treq.Header.Set(\"Ya-Consumer-Authorization\", \"OAuth \"+s.token)\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar auth struct {\n\t\tPassportHost string `json:\"passport_host\"`\n\t\tStatus       string `json:\"status\"`\n\t\tTrackId      string `json:\"track_id\"`\n\t}\n\tif err = json.NewDecoder(res.Body).Decode(&auth); err != nil {\n\t\treturn err\n\t}\n\n\tif auth.Status != \"ok\" {\n\t\treturn errors.New(\"yandex: login error: \" + auth.Status)\n\t}\n\n\ts.client = &http.Client{Timeout: 15 * time.Second}\n\ts.client.CheckRedirect = func(req *http.Request, via []*http.Request) error {\n\t\treturn http.ErrUseLastResponse\n\t}\n\ts.client.Jar, _ = cookiejar.New(nil)\n\n\tres, err = s.client.Get(auth.PassportHost + \"/auth/session/?track_id=\" + auth.TrackId)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.client.CheckRedirect = nil\n\n\treturn nil\n}\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/yandex/session.go#L51-L87","documentation":"Yandex session Login guard: the auth-step request transported and decoded fine, but auth.Status != 'ok' (status appended, e.g. 'error'). Yandex rejected the login step — expired OAuth token, wrong credentials, or a required additional auth factor per the returned status.","triggerScenarios":"Thrown at pkg/yandex/session.go:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the Yandex OAuth token used as s.token","Inspect the appended status/track_id via the track_id with Yandex support flows","Re-run the full login sequence from a fresh session"],"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"}