{"record":{"id":"b00adfc06560818a","repo":"AlistGo/alist","slug":"empty-clientid-or-clientsecret","errorCode":null,"errorMessage":"empty ClientID or ClientSecret","messagePattern":"empty ClientID or ClientSecret","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/aliyundrive_open/util.go","lineNumber":42,"sourceCode":"type refreshRateLimitError struct {\n\tmessage    string\n\tretryAfter time.Duration\n}\n\nfunc (e *refreshRateLimitError) Error() string {\n\tif e.retryAfter > 0 {\n\t\treturn fmt.Sprintf(\"%s, retry after %s\", e.message, e.retryAfter.Round(time.Second))\n\t}\n\treturn e.message\n}\n\nfunc (d *AliyundriveOpen) _refreshToken(ctx context.Context) (string, string, error) {\n\tif d.OauthTokenURL != \"\" && d.ClientID == \"\" {\n\t\treturn d.refreshTokenWithOnlineAPI(ctx)\n\t}\n\n\tif d.ClientID == \"\" || d.ClientSecret == \"\" {\n\t\treturn \"\", \"\", fmt.Errorf(\"empty ClientID or ClientSecret\")\n\t}\n\treturn d.refreshTokenWithPost(ctx, API_URL+\"/oauth/access_token\")\n}\n\nfunc (d *AliyundriveOpen) refreshTokenWithOnlineAPI(ctx context.Context) (string, string, error) {\n\t// New hosted renew endpoint uses a GET API and returns {\"refresh_token\",\"access_token\",\"text\"}.\n\t// Older hosted endpoints still expect the legacy POST payload, so we fall back when we detect that shape.\n\tvar resp struct {\n\t\tRefreshToken string `json:\"refresh_token\"`\n\t\tAccessToken  string `json:\"access_token\"`\n\t\tErrorMessage string `json:\"text\"`\n\t}\n\tvar e ErrResp\n\tif err := d.wait(ctx, limiterOther); err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\tres, err := base.RestyClient.R().\n\t\tSetResult(&resp).","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/aliyundrive_open/util.go#L24-L60","documentation":"Error \"empty ClientID or ClientSecret\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/aliyundrive_open/util.go:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the referenced value is configured and non-empty, then 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-15T22:17:37.221Z"}