{"record":{"id":"7046226f13287444","repo":"mickael-kerjean/filestash","slug":"no-such-file-or-directory","errorCode":null,"errorMessage":"No such file or directory","messagePattern":"No such file or directory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/plugin/plg_handler_mcp/impl/tools_fs.go","lineNumber":314,"sourceCode":"\t\t},\n\t}, nil\n}\n\nfunc ToolFSPwd(params map[string]any, userSession *UserSession) (*ToolResponse, error) {\n\treturn &ToolResponse{\n\t\tContent: []TextContent{\n\t\t\t{\n\t\t\t\tType: \"text\",\n\t\t\t\tText: userSession.CurrDir,\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\nfunc ToolFSCd(params map[string]any, userSession *UserSession) (*ToolResponse, error) {\n\tpath := EnforceDirectory(getPath(params, userSession, \"path\"))\n\tif _, err := userSession.Backend.Ls(path); err != nil {\n\t\treturn nil, errors.New(\"No such file or directory\")\n\t}\n\tuserSession.CurrDir = EnforceDirectory(path)\n\treturn &ToolResponse{\n\t\tContent: []TextContent{\n\t\t\t{\n\t\t\t\tType: \"text\",\n\t\t\t\tText: userSession.CurrDir,\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\nfunc ToolFSMv(params map[string]any, userSession *UserSession) (*ToolResponse, error) {\n\tif isArgEmpty(params, \"from\") || isArgEmpty(params, \"to\") {\n\t\treturn nil, ErrNotValid\n\t}\n\tif err := userSession.Backend.Mv(\n\t\tgetPath(params, userSession, \"from\"),","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/mickael-kerjean/filestash/blob/78f756eb94ef383f1f1cd4bc3077a43a4d088ff0/server/plugin/plg_handler_mcp/impl/tools_fs.go#L296-L332","documentation":"A generic sentinel error returned by ToolFSCd when userSession.Backend.Ls(path) fails for the target directory. It replaces whatever the real backend error was (missing directory, permission denial, backend outage), so the message may not reflect the actual cause; the faulting input is the resolved 'path' parameter.","triggerScenarios":"Thrown at server/plugin/plg_handler_mcp/impl/tools_fs.go:314 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the 'path' parameter resolves to an existing directory on the configured backend","Check backend credentials/permissions allow listing the target directory","Log or wrap the original Ls error so real causes (not_found vs permission denied) are distinguishable","Test the same path directly against the backend to isolate MCP-layer issues"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f756eb94ef383f1f1cd4bc3077a43a4d088ff0","analyzedAt":"2026-09-06T11:52:48.712Z","contentChangedAt":"2026-09-06T11:52:48.712Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}