{"record":{"id":"f4c07beeb9810e80","repo":"AlistGo/alist","slug":"list-failed-s","errorCode":null,"errorMessage":"list failed: %s","messagePattern":"list failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/bitqiu/driver.go","lineNumber":137,"sourceCode":"\t\t\t\"desc\":        desc,\n\t\t\t\"model\":       \"1\",\n\t\t\t\"userId\":      d.userID,\n\t\t\t\"currentPage\": strconv.Itoa(page),\n\t\t\t\"page\":        strconv.Itoa(page),\n\t\t\t\"org_channel\": orgChannel,\n\t\t}\n\t\tvar resp Response[ResourcePage]\n\t\tif err := d.postForm(ctx, listURL, form, &resp); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif resp.Code != successCode {\n\t\t\tif resp.Code == \"10401\" || resp.Code == \"10404\" {\n\t\t\t\tif err := d.login(ctx); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"list failed: %s\", resp.Message)\n\t\t}\n\n\t\tobjs, err := utils.SliceConvert(resp.Data.Data, func(item Resource) (model.Obj, error) {\n\t\t\treturn item.toObject(parentID, dirPath)\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresults = append(results, objs...)\n\n\t\tif !resp.Data.HasNext || len(resp.Data.Data) == 0 {\n\t\t\tbreak\n\t\t}\n\t\tpage++\n\t}\n\n\treturn results, nil\n}","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/bitqiu/driver.go#L119-L155","documentation":"Returned by BitQiu.List (drivers/bitqiu/driver.go:137): the paginated list API returned a code other than success ('10200'), and the server message is wrapped as 'list failed: %s'. Codes '10401' and '10404' are handled inline by re-logging-in and retrying the page; this error means a different, non-auth failure code got through.","triggerScenarios":"Listing with an invalid/explicitly wrong parent resource id; account out of quota or banned; server-side message like permission denied or malformed request; any business error code beyond 10401/10404 on the list endpoint.","commonSituations":"Stored session went stale in a way re-login does not fix; the listed folder was deleted server-side; API changes introducing new business codes.","solutions":["Read resp.Message in the error text — it is the server's own description and pinpoints the code","Verify the credentials (username/password) by re-initializing the storage","Confirm the directory still exists by listing its parent","Map recurring codes to explicit handling next to the existing 10401/10404 branch"],"exampleFix":"// before\nreturn nil, fmt.Errorf(\"list failed: %s\", resp.Message)\n\n// after (surface the code for diagnosability, keep auth-retry behavior)\nreturn nil, fmt.Errorf(\"list failed: code=%s msg=%s\", resp.Code, resp.Message)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"func isBitQiuAuthCode(code string) bool {\n    return code == \"10401\" || code == \"10404\"\n}","tryCatchPattern":"objs, err := d.List(ctx, dir, args)\nif err != nil {\n    if strings.HasPrefix(err.Error(), \"list failed:\") {\n        // resp.Message is embedded; distinguish auth (auto-handled) from business errors\n        return nil, fmt.Errorf(\"bitqiu list failed for %s: %w\", dir.GetPath(), err)\n    }\n    return nil, err\n}","preventionTips":["The message after 'list failed:' is the server's own text — always read it before acting","Codes 10401/10404 already trigger auto re-login; other codes need config or input fixes","Verify the storage's username/password and that the target folder exists when this repeats"],"tags":["bitqiu","list","api","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}