{"record":{"id":"5f443c9577956893","repo":"nats-io/nats-server","slug":"error-parsing-path-s-v","errorCode":null,"errorMessage":"error parsing path [%s]: %v","messagePattern":"error parsing path \\[(.+?)\\]: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/dirstore.go","lineNumber":47,"sourceCode":"\n\t\"github.com/nats-io/nkeys\"\n\n\t\"github.com/nats-io/jwt/v2\" // only used to decode, not for storage\n)\n\nconst (\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}","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/dirstore.go#L29-L65","documentation":"Directory JWT store path validation: filepath.Abs failed while resolving the provided store path, meaning the path string is malformed in a way the OS rejects (e.g. unresolvable relative components).","triggerScenarios":"Thrown at server/dirstore.go:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the resolver/store path in configuration","Use an absolute path or valid relative path","Check for invalid characters or excessive length in the 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"}