{"record":{"id":"78ea57ee123a7bbc","repo":"ipfs/kubo","slug":"s-w-78ea57","errorCode":null,"errorMessage":"%s: %w","messagePattern":"%s: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/files.go","lineNumber":846,"sourceCode":"\t},\n\tOptions: []cmds.Option{\n\t\tcmds.Int64Option(filesOffsetOptionName, \"o\", \"Byte offset to begin reading from.\"),\n\t\tcmds.Int64Option(filesCountOptionName, \"n\", \"Maximum number of bytes to read.\"),\n\t},\n\tRun: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {\n\t\tnd, err := cmdenv.GetNode(env)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tpath, err := checkPath(req.Arguments[0])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfsn, err := mfs.Lookup(nd.FilesRoot, path)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", path, err)\n\t\t}\n\n\t\tfi, ok := fsn.(*mfs.File)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"%s was not a file\", path)\n\t\t}\n\n\t\trfd, err := fi.Open(req.Context, mfs.Flags{Read: true})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tdefer rfd.Close()\n\n\t\toffset, _ := req.Options[offsetOptionName].(int64)\n\t\tif offset < 0 {\n\t\t\treturn fmt.Errorf(\"cannot specify negative offset\")\n\t\t}","sourceCodeStart":828,"sourceCodeEnd":864,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/files.go#L828-L864","documentation":"'ipfs files read': mfs.Lookup of the given path inside the MFS root failed, and the error is wrapped with the path for context. The underlying %w is typically 'no link named ...' (missing entry) or 'invalid path', so the named file does not exist in the files API namespace.","triggerScenarios":"Thrown at core/commands/files.go:846 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List the parent with 'ipfs files ls' to check the exact name","Create the file first (e.g. 'ipfs files write --create')","Fix typos or leading slash usage in the /ipfs-files path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}