{"record":{"id":"93e87be103142417","repo":"getsops/sops","slug":"connectstr-s-err","errorCode":null,"errorMessage":"connectStr: %s, err","messagePattern":"connectStr: (.+?), err","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"audit/audit.go","lineNumber":46,"sourceCode":"\t}\n\tvar conf config\n\terr = yaml.Unmarshal(confBytes, &conf)\n\tif err != nil {\n\t\tlog.WithField(\"error\", err).Panicf(\"Error unmarshalling config\")\n\t}\n\t// If we are running test, then don't create auditors.\n\t// This is pretty hacky, but doing it The Right Way would require\n\t// restructuring SOPS to use dependency injection instead of just using\n\t// globals everywhere.\n\tif flag.Lookup(\"test.v\") != nil {\n\t\treturn\n\t}\n\tvar auditErrors []error\n\n\tfor _, pgConf := range conf.Backends.Postgres {\n\t\tauditDb, err := NewPostgresAuditor(pgConf.ConnStr)\n\t\tif err != nil {\n\t\t\tauditErrors = append(auditErrors, errors.Wrap(err, fmt.Sprintf(\"connectStr: %s, err\", pgConf.ConnStr)))\n\t\t}\n\t\tauditors = append(auditors, auditDb)\n\t}\n\tif len(auditErrors) > 0 {\n\t\tlog.Errorf(\"connecting to audit database, defined in %s\", configFile)\n\t\tfor _, err := range auditErrors {\n\t\t\tlog.Error(err)\n\t\t}\n\t\tlog.Fatal(\"one or more audit backends reported errors, exiting\")\n\t}\n}\n\n// TODO: Make platform agnostic\nconst configFile = \"/etc/sops/audit.yaml\"\n\ntype config struct {\n\tBackends struct {\n\t\tPostgres []struct {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/audit/audit.go#L28-L64","documentation":"Error \"connectStr: %s, err\" thrown in getsops/sops.","triggerScenarios":"Thrown at audit/audit.go:46 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"}