{"record":{"id":"d728ce23314d2e6a","repo":"hyperledger/fabric","slug":"s-does-not-exist","errorCode":null,"errorMessage":"%s does not exist","messagePattern":"(.+?) does not exist","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/config/configtest/config.go","lineNumber":89,"sourceCode":"}\n\nfunc gomodDevConfigDir() (string, error) {\n\tbuf := bytes.NewBuffer(nil)\n\tcmd := exec.Command(\"go\", \"env\", \"GOMOD\")\n\tcmd.Stdout = buf\n\n\tif err := cmd.Run(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tmodFile := strings.TrimSpace(buf.String())\n\tif modFile == \"\" {\n\t\treturn \"\", errors.New(\"not a module or not in module mode\")\n\t}\n\n\tdevPath := filepath.Join(filepath.Dir(modFile), \"sampleconfig\")\n\tif !dirExists(devPath) {\n\t\treturn \"\", fmt.Errorf(\"%s does not exist\", devPath)\n\t}\n\n\treturn devPath, nil\n}\n\n// GetDevMspDir gets the path to the sampleconfig/msp tree that is maintained\n// with the source tree.  This should only be used in a test/development\n// context.\nfunc GetDevMspDir() string {\n\tdevDir := GetDevConfigDir()\n\treturn filepath.Join(devDir, \"msp\")\n}\n\nfunc SetDevFabricConfigPath(t *testing.T) {\n\tt.Helper()\n\tt.Setenv(\"FABRIC_CFG_PATH\", GetDevConfigDir())\n}\n","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/config/configtest/config.go#L71-L107","documentation":"Returned by gomodDevConfigDir when the sampleconfig directory expected next to the go.mod file is absent. Dev/test config discovery ran in module mode but the usual sampleconfig tree is missing from the checkout.","triggerScenarios":"Thrown at core/config/configtest/config.go:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restore or create the sampleconfig directory in the module root","Point tests at an explicit config directory instead of auto-discovery"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}