{"record":{"id":"86230c6a04a2989a","repo":"getsops/sops","slug":"error-marshaling-to-ini-s","errorCode":null,"errorMessage":"Error marshaling to INI: %s","messagePattern":"Error marshaling to INI: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/ini/store.go","lineNumber":179,"sourceCode":"\n// EmitEncryptedFile returns encrypted INI file bytes corresponding to a sops.Tree\n// runtime object\nfunc (store *Store) EmitEncryptedFile(in sops.Tree) ([]byte, error) {\n\tbranches, err := stores.SerializeMetadata(in, stores.MetadataOpts{\n\t\tFlatten:        stores.MetadataFlattenBelowTop,\n\t\tEscapeNewlines: true,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error marshaling metadata: %s\", err)\n\t}\n\treturn store.EmitPlainFile(branches)\n}\n\n// EmitPlainFile returns the plaintext INI file bytes corresponding to a sops.TreeBranches object\nfunc (store *Store) EmitPlainFile(in sops.TreeBranches) ([]byte, error) {\n\tout, err := store.iniFromTreeBranches(in)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error marshaling to INI: %s\", err)\n\t}\n\treturn out, nil\n}\n\nfunc (store Store) encodeValue(v interface{}) ([]byte, error) {\n\tswitch v := v.(type) {\n\tcase sops.TreeBranches:\n\t\treturn store.encodeTree(v)\n\tdefault:\n\t\treturn json.Marshal(v)\n\t}\n}\n\n// EmitValue returns a single value encoded in a generic interface{} as bytes\nfunc (store *Store) EmitValue(v interface{}) ([]byte, error) {\n\treturn store.encodeValue(v)\n}\n","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/ini/store.go#L161-L197","documentation":"Error \"Error marshaling to INI: %s\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/ini/store.go:179 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"}