getsops/sops · error
Type mismatch
Error message
Type mismatch
What it means
Error "Type mismatch" thrown in getsops/sops.
Source
Thrown at stores/flatten.go:123
return fmt.Errorf("Duplicate value")
}
root.value = value
return nil
}
func b2i(value bool) int {
if value {
return 1
}
return 0
}
func convert(root *node) (interface{}, error) {
hasValue := root.value != nil
hasSubkey := len(root.subkeys) > 0
hasIndex := len(root.indices) > 0
if b2i(hasValue)+b2i(hasSubkey)+b2i(hasIndex) > 1 {
return nil, fmt.Errorf("Type mismatch")
}
if !hasValue && !hasSubkey && !hasIndex {
return sops.TreeBranch{}, nil
}
if hasValue {
return *root.value, nil
}
if hasSubkey {
keys := make([]string, len(root.subkeys))
index := 0
for k := range root.subkeys {
keys[index] = k
index += 1
}
sort.Strings(keys)
result := make(sops.TreeBranch, len(keys))
for index, key := range keys {
value, err := convert(root.subkeys[key])View on GitHub (pinned to 13442bb981)
When it happens
Trigger: Thrown at stores/flatten.go:123 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getsops/sops@13442bb981 (2026-09-01).
Data as JSON: /api/errors/7262a26551e1cc69.
Report an issue: GitHub.