{"record":{"id":"9b8e1b5017e26bdd","repo":"nats-io/nats-server","slug":"the-path-s-doesn-t-exist","errorCode":null,"errorMessage":"the path [%s] doesn't exist","messagePattern":"the path \\[(.+?)\\] doesn't exist","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/dirstore.go","lineNumber":53,"sourceCode":"const (\n\tfileExtension = \".jwt\"\n)\n\n// validatePathExists checks that the provided path exists and is a dir if requested\nfunc validatePathExists(path string, dir bool) (string, error) {\n\tif path == _EMPTY_ {\n\t\treturn _EMPTY_, errors.New(\"path is not specified\")\n\t}\n\n\tabs, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn _EMPTY_, fmt.Errorf(\"error parsing path [%s]: %v\", abs, err)\n\t}\n\n\tvar finfo os.FileInfo\n\tif finfo, err = os.Stat(abs); err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn _EMPTY_, fmt.Errorf(\"the path [%s] doesn't exist\", abs)\n\t\t}\n\t\treturn _EMPTY_, fmt.Errorf(\"error accessing path [%s]: %v\", abs, err)\n\t}\n\n\tmode := finfo.Mode()\n\tif dir && mode.IsRegular() {\n\t\treturn _EMPTY_, fmt.Errorf(\"the path [%s] is not a directory\", abs)\n\t}\n\n\tif !dir && mode.IsDir() {\n\t\treturn _EMPTY_, fmt.Errorf(\"the path [%s] is not a file\", abs)\n\t}\n\n\treturn abs, nil\n}\n\n// ValidateDirPath checks that the provided path exists and is a dir\nfunc validateDirPath(path string) (string, error) {","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/dirstore.go#L35-L71","documentation":"Directory JWT store path validation: os.Stat returned ENOENT for the resolved absolute path, so the configured resolver directory (or file) does not exist on disk.","triggerScenarios":"Thrown at server/dirstore.go:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the directory before starting the server","Point the config at an existing path","Fix typos in the resolver path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}