{"record":{"id":"e1714810e5ca1e3f","repo":"getsops/sops","slug":"duplicate-value","errorCode":null,"errorMessage":"Duplicate value","messagePattern":"Duplicate value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/flatten.go","lineNumber":105,"sourceCode":"\t\t\tnext, ok = root.subkeys[t.key]\n\t\t\tif !ok {\n\t\t\t\tnext = &node{}\n\t\t\t\troot.subkeys[t.key] = next\n\t\t\t}\n\t\tcase listToken:\n\t\t\tif root.indices == nil {\n\t\t\t\troot.indices = make(map[int]*node)\n\t\t\t}\n\t\t\tnext, ok = root.indices[t.position]\n\t\t\tif !ok {\n\t\t\t\tnext = &node{}\n\t\t\t\troot.indices[t.position] = next\n\t\t\t}\n\t\t}\n\t\troot = next\n\t}\n\tif root.value != nil {\n\t\treturn fmt.Errorf(\"Duplicate value\")\n\t}\n\troot.value = value\n\treturn nil\n}\n\nfunc b2i(value bool) int {\n\tif value {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\nfunc convert(root *node) (interface{}, error) {\n\thasValue := root.value != nil\n\thasSubkey := len(root.subkeys) > 0\n\thasIndex := len(root.indices) > 0\n\tif b2i(hasValue)+b2i(hasSubkey)+b2i(hasIndex) > 1 {\n\t\treturn nil, fmt.Errorf(\"Type mismatch\")","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/flatten.go#L87-L123","documentation":"Error \"Duplicate value\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/flatten.go:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13442bb98183887d7a9ac09ec8ab0564673a59d8","analyzedAt":"2026-09-01T03:53:00.447Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}