{"record":{"id":"ab9f93ed62180041","repo":"AlistGo/alist","slug":"empty-captchatoken","errorCode":null,"errorMessage":"empty captchaToken","messagePattern":"empty captchaToken","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/thunder/util.go","lineNumber":161,"sourceCode":"\tvar resp CaptchaTokenResponse\n\t_, err := c.Request(XLUSER_API_URL+\"/shield/captcha/init\", http.MethodPost, func(req *resty.Request) {\n\t\treq.SetError(&e).SetBody(param)\n\t}, &resp)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif e.IsError() {\n\t\treturn &e\n\t}\n\n\tif resp.Url != \"\" {\n\t\treturn fmt.Errorf(`need verify: <a target=\"_blank\" href=\"%s\">Click Here</a>`, resp.Url)\n\t}\n\n\tif resp.CaptchaToken == \"\" {\n\t\treturn fmt.Errorf(\"empty captchaToken\")\n\t}\n\n\tif c.refreshCTokenCk != nil {\n\t\tc.refreshCTokenCk(resp.CaptchaToken)\n\t}\n\tc.SetCaptchaToken(resp.CaptchaToken)\n\treturn nil\n}\n\n// 只有基础信息的请求\nfunc (c *Common) Request(url, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {\n\treq := c.client.R().SetHeaders(map[string]string{\n\t\t\"user-agent\":       c.UserAgent,\n\t\t\"accept\":           \"application/json;charset=UTF-8\",\n\t\t\"x-device-id\":      c.DeviceID,\n\t\t\"x-client-id\":      c.ClientID,\n\t\t\"x-client-version\": c.ClientVersion,\n\t})","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/thunder/util.go#L143-L179","documentation":"Error \"empty captchaToken\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/thunder/util.go:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid token in the storage configuration and save it again.","If the token expired, re-login or refresh it through the provider and update the configuration."],"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-15T22:17:37.221Z"}