{"record":{"id":"fe76e71dff71e30f","repo":"getsops/sops","slug":"yaml-documents-that-are-values-are-not-supported","errorCode":null,"errorMessage":"YAML documents that are values are not supported","messagePattern":"YAML documents that are values are not supported","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/yaml/store.go","lineNumber":162,"sourceCode":"\t\t\tvalueTV, err := store.nodeToTreeValue(value, handleValueComments)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tbranch = append(branch, sops.TreeItem{\n\t\t\t\tKey:   keyValue,\n\t\t\t\tValue: valueTV,\n\t\t\t})\n\t\t\tif handleValueComments {\n\t\t\t\tbranch = store.appendCommentToMap(value.FootComment, branch)\n\t\t\t}\n\t\t\tbranch = store.appendCommentToMap(key.FootComment, branch)\n\t\t}\n\tcase yaml.ScalarNode:\n\t\t// A empty document with a document start marker without comments results in null\n\t\tif node.ShortTag() == \"!!null\" {\n\t\t\treturn branch, nil\n\t\t}\n\t\treturn nil, fmt.Errorf(\"YAML documents that are values are not supported\")\n\tcase yaml.AliasNode:\n\t\tbranch, err = store.appendYamlNodeToTreeBranch(node.Alias, branch, false)\n\t\tif err != nil {\n\t\t\t// This should never happen since node.Alias was already successfully decoded before\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif !commentsWereHandled {\n\t\tbranch = store.appendCommentToMap(node.FootComment, branch)\n\t}\n\treturn branch, nil\n}\n\nfunc (store Store) yamlDocumentNodeToTreeBranch(in yaml.Node) (sops.TreeBranch, error) {\n\tbranch := make(sops.TreeBranch, 0)\n\treturn store.appendYamlNodeToTreeBranch(&in, branch, false)\n}\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/yaml/store.go#L144-L180","documentation":"Error \"YAML documents that are values are not supported\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/yaml/store.go:162 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"}