{"record":{"id":"3bb53df527112160","repo":"AlistGo/alist","slug":"failed-to-list-directory-w","errorCode":null,"errorMessage":"failed to list directory: %w","messagePattern":"failed to list directory: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/proton_drive/driver.go","lineNumber":221,"sourceCode":"}\n\nfunc (d *ProtonDrive) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) {\n\tvar linkID string\n\n\tif dir.GetPath() == \"/\" {\n\t\tlinkID = d.protonDrive.RootLink.LinkID\n\t} else {\n\n\t\tlink, err := d.searchByPath(ctx, dir.GetPath(), true)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tlinkID = link.LinkID\n\t}\n\n\tentries, err := d.protonDrive.ListDirectory(ctx, linkID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list directory: %w\", err)\n\t}\n\n\t//fmt.Printf(\"Found %d entries for path %s\\n\", len(entries), dir.GetPath())\n\t//fmt.Printf(\"Found %d entries\\n\", len(entries))\n\n\tif len(entries) == 0 {\n\t\temptySlice := []model.Obj{}\n\n\t\t//fmt.Printf(\"Returning empty slice (entries): %+v\\n\", emptySlice)\n\n\t\treturn emptySlice, nil\n\t}\n\n\tvar objects []model.Obj\n\tfor _, entry := range entries {\n\t\tobj := &model.Object{\n\t\t\tName:     entry.Name,\n\t\t\tSize:     entry.Link.Size,","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/driver.go#L203-L239","documentation":"Error \"failed to list directory: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/driver.go:221 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry."],"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"}