{"record":{"id":"803ba0628a1d1d5d","repo":"AlistGo/alist","slug":"wukong-list-failed-code-d-message-s","errorCode":null,"errorMessage":"wukong list failed: code=%d message=%s","messagePattern":"wukong list failed: code=(.+?) message=(.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/wukong/driver.go","lineNumber":115,"sourceCode":"\t\t\t\t\"offset\":          strconv.Itoa(offset),\n\t\t\t\t\"limit\":           strconv.Itoa(limit),\n\t\t\t\t\"aid\":             d.Aid,\n\t\t\t\t\"device_platform\": \"web\",\n\t\t\t\t\"language\":        d.Language,\n\t\t\t}).\n\t\t\tSetBody(map[string]any{\n\t\t\t\t\"father_id\":   asIDValue(fatherID),\n\t\t\t\t\"filter_type\": 2,\n\t\t\t\t\"is_desc\":     1,\n\t\t\t\t\"file_type\":   0,\n\t\t\t}).\n\t\t\tSetResult(&resp).\n\t\t\tPost(\"/netdisk/user_file/filter_file\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif resp.Code != 0 {\n\t\t\treturn nil, fmt.Errorf(\"wukong list failed: code=%d message=%s\", resp.Code, resp.Message)\n\t\t}\n\n\t\tfor _, item := range resp.Data.FileList {\n\t\t\tobjs = append(objs, &model.Object{\n\t\t\t\tID:       strconv.FormatInt(item.FileID, 10),\n\t\t\t\tPath:     strconv.FormatInt(item.FatherID, 10),\n\t\t\t\tName:     item.FileName,\n\t\t\t\tSize:     item.Size,\n\t\t\t\tModified: parseUnix(item.UpdatedAt),\n\t\t\t\tCtime:    parseUnix(item.CreatedAt),\n\t\t\t\tIsFolder: item.IsDirectory == 1,\n\t\t\t})\n\t\t}\n\n\t\tif !hasMore(resp.Data.HasMore) || len(resp.Data.FileList) == 0 {\n\t\t\tbreak\n\t\t}\n\t\toffset += len(resp.Data.FileList)","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/wukong/driver.go#L97-L133","documentation":"The Wukong (Datavol) driver's List method posts to /netdisk/user_file/filter_file and expects business code 0 in the JSON envelope. A non-zero resp.Code with resp.Message is surfaced verbatim, indicating the wukong API refused the listing (auth expiry, invalid father_id, permission or rate issues).","triggerScenarios":"Listing any directory where the HTTP call succeeds but resp.Code != 0 — expired token re-login failure, father_id pointing to a deleted/foreign folder, or server-side limits.","commonSituations":"Long-running mounts with stale tokens, moving/renaming the listed folder elsewhere, or hitting request-frequency caps on the wukong API.","solutions":["Refresh credentials: re-run the driver login so a fresh token is used.","Verify the father_id/folder exists on the official wukong client; re-list the parent to resync IDs.","Slow down listing/copy jobs to avoid rate-limit codes, and retry after a pause."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"objs, err := d.listDir(fatherID)\nif err != nil && strings.Contains(err.Error(), \"wukong list failed\") {\n    time.Sleep(3 * time.Second)\n    objs, err = d.listDir(fatherID) // one retry for rate/auth blips\n    if err != nil { relogin(); objs, err = d.listDir(fatherID) }\n}","preventionTips":["Refresh tokens proactively before expiry","Cache listings briefly to cut API calls","Verify folder IDs after moves/deletes on the official client"],"tags":["wukong","api-error","list","authentication"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}