{"record":{"id":"8a6a725588e422b2","repo":"slackhq/nebula","slug":"problem-while-reading-directory-s-s","errorCode":null,"errorMessage":"problem while reading directory %s: %s","messagePattern":"problem while reading directory (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/config.go","lineNumber":344,"sourceCode":"\treturn v\n}\n\n// direct signifies if this is the config path directly specified by the user,\n// versus a file/dir found by recursing into that path\nfunc (c *C) resolve(path string, direct bool) error {\n\ti, err := os.Stat(path)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tif !i.IsDir() {\n\t\tc.addFile(path, direct)\n\t\treturn nil\n\t}\n\n\tpaths, err := readDirNames(path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"problem while reading directory %s: %s\", path, err)\n\t}\n\n\tfor _, p := range paths {\n\t\terr := c.resolve(filepath.Join(path, p), false)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *C) addFile(path string, direct bool) error {\n\text := filepath.Ext(path)\n\n\tif !direct && ext != \".yaml\" && ext != \".yml\" {\n\t\treturn nil\n\t}","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/config/config.go#L326-L362","documentation":"Wrapping error from config.C.resolve: readDirNames failed while listing a directory during recursive config discovery — typically a permission error or the directory disappearing mid-scan. The directory path and OS error are both included; resolution stops immediately.","triggerScenarios":"Thrown at config/config.go:344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check read permissions on the reported directory","Remove/replace unreadable subdirectories from the config path","Avoid pointing config at directories with unrelated restricted content"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}