{"record":{"id":"eca6058f36a6eec4","repo":"AlistGo/alist","slug":"e-error","errorCode":null,"errorMessage":"e.Error()","messagePattern":"e\\.Error\\(\\)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/pikpak/util.go","lineNumber":247,"sourceCode":"\t}).SetQueryParam(\"client_id\", d.ClientID).Post(url)\n\tif err != nil {\n\t\td.Status = err.Error()\n\t\top.MustSaveDriverStorage(d)\n\t\treturn err\n\t}\n\tif e.ErrorCode != 0 {\n\t\tif e.ErrorCode == 4126 {\n\t\t\t// 1. 未填写 username 或 password\n\t\t\tif d.Addition.Username == \"\" || d.Addition.Password == \"\" {\n\t\t\t\treturn errors.New(\"refresh_token invalid, please re-provide refresh_token\")\n\t\t\t} else {\n\t\t\t\t// refresh_token invalid, re-login\n\t\t\t\treturn d.login()\n\t\t\t}\n\t\t}\n\t\td.Status = e.Error()\n\t\top.MustSaveDriverStorage(d)\n\t\treturn errors.New(e.Error())\n\t}\n\tdata := res.Body()\n\td.Status = \"work\"\n\td.RefreshToken = jsoniter.Get(data, \"refresh_token\").ToString()\n\td.AccessToken = jsoniter.Get(data, \"access_token\").ToString()\n\td.Common.SetUserID(jsoniter.Get(data, \"sub\").ToString())\n\td.Addition.RefreshToken = d.RefreshToken\n\top.MustSaveDriverStorage(d)\n\treturn nil\n}\n\nfunc (d *PikPak) request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {\n\treq := base.RestyClient.R()\n\treq.SetHeaders(map[string]string{\n\t\t//\"Authorization\":   \"Bearer \" + d.AccessToken,\n\t\t\"User-Agent\":      d.GetUserAgent(),\n\t\t\"X-Device-ID\":     d.GetDeviceID(),\n\t\t\"X-Captcha-Token\": d.GetCaptchaToken(),","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/pikpak/util.go#L229-L265","documentation":"Error \"e.Error()\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/pikpak/util.go:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}