{"record":{"id":"a4bcbda8a8473edc","repo":"getsops/sops","slug":"s-s-s","errorCode":null,"errorMessage":"%s%s%s","messagePattern":"%s%s%s","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"age/keysource.go","lineNumber":237,"sourceCode":"\tif len(errs) > 0 {\n\t\tloadSuffix = fmt.Sprintf(\". Errors while loading age identities: %s\", errs.Error())\n\t}\n\tvar unusedSuffix string\n\tif len(unusedLocations) > 0 {\n\t\tcount := len(unusedLocations)\n\t\tif count == 1 {\n\t\t\tunusedSuffix = fmt.Sprintf(\" '%s'\", unusedLocations[0])\n\t\t} else if count == 2 {\n\t\t\tunusedSuffix = fmt.Sprintf(\"s '%s' and '%s'\", unusedLocations[0], unusedLocations[1])\n\t\t} else {\n\t\t\tunusedSuffix = fmt.Sprintf(\"s '%s', and '%s'\", strings.Join(unusedLocations[:count-1], \"', '\"), unusedLocations[count-1])\n\t\t}\n\t\tunusedSuffix = fmt.Sprintf(\". Did not find keys in location%s.\", unusedSuffix)\n\t}\n\tif err != nil {\n\t\treturn fmt.Errorf(\"%s: %w%s%s\", msg, err, loadSuffix, unusedSuffix)\n\t} else {\n\t\treturn fmt.Errorf(\"%s%s%s\", msg, loadSuffix, unusedSuffix)\n\t}\n}\n\n// Decrypt decrypts the EncryptedKey with the parsed or loaded identities, and\n// returns the result.\nfunc (key *MasterKey) Decrypt() ([]byte, error) {\n\tvar errs errSet\n\tvar unusedLocations []string\n\tif len(key.parsedIdentities) == 0 {\n\t\tvar ids ParsedIdentities\n\t\tids, unusedLocations, errs = key.loadIdentities()\n\t\tif len(ids) == 0 {\n\t\t\tlog.Info(\"Decryption failed\")\n\t\t\treturn nil, formatError(\"failed to load age identities\", nil, errs, unusedLocations)\n\t\t}\n\t\tids.ApplyToMasterKey(key)\n\t}\n","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/age/keysource.go#L219-L255","documentation":"Error \"%s%s%s\" thrown in getsops/sops.","triggerScenarios":"Thrown at age/keysource.go:237 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"}