{"record":{"id":"30d9a7478e4c902e","repo":"getsops/sops","slug":"error-unmarshaling-input-yaml-s","errorCode":null,"errorMessage":"Error unmarshaling input YAML: %s","messagePattern":"Error unmarshaling input YAML: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/yaml/store.go","lineNumber":340,"sourceCode":"// sops.Tree runtime object\nfunc (store *Store) LoadPlainFile(in []byte) (sops.TreeBranches, error) {\n\tvar branches sops.TreeBranches\n\tif len(in) > 0 {\n\t\t// This is needed to make the yaml-decoder check for uniqueness of keys\n\t\t// Can probably be removed when https://github.com/go-yaml/yaml/issues/814 is merged.\n\t\tif err := yaml.NewDecoder(bytes.NewReader(in)).Decode(make(map[string]interface{})); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\td := yaml.NewDecoder(bytes.NewReader(in))\n\tfor {\n\t\tvar data yaml.Node\n\t\terr := d.Decode(&data)\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Error unmarshaling input YAML: %s\", err)\n\t\t}\n\n\t\tbranch, err := store.yamlDocumentNodeToTreeBranch(data)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Error unmarshaling input YAML: %s\", err)\n\t\t}\n\t\tbranches = append(branches, branch)\n\t}\n\treturn branches, nil\n}\n\nfunc (store *Store) getIndentation() (int, error) {\n\tif store.config.Indent > 0 {\n\t\treturn store.config.Indent, nil\n\t} else if store.config.Indent < 0 {\n\t\treturn 0, errors.New(\"YAML Negative indentation not accepted\")\n\t}\n\treturn IndentDefault, nil","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/yaml/store.go#L322-L358","documentation":"Error \"Error unmarshaling input YAML: %s\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/yaml/store.go:340 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"}