diff --git a/catalogd/cmd/catalogd/main.go b/catalogd/cmd/catalogd/main.go index 77698444c..7ce417970 100644 --- a/catalogd/cmd/catalogd/main.go +++ b/catalogd/cmd/catalogd/main.go @@ -143,12 +143,12 @@ func main() { } if (certFile != "" && keyFile == "") || (certFile == "" && keyFile != "") { - setupLog.Error(nil, "unable to configure TLS certificates: tls-cert and tls-key flags must be used together") + setupLog.Error(fmt.Errorf("unable to configure TLS certificates"), "tls-cert and tls-key flags must be used together") os.Exit(1) } if metricsAddr != "" && certFile == "" && keyFile == "" { - setupLog.Error(nil, "metrics-bind-address requires tls-cert and tls-key flags to be set") + setupLog.Error(fmt.Errorf("unable to configure metrics-bind-address"), "metrics-bind-address requires tls-cert and tls-key flags to be set") os.Exit(1) } diff --git a/cmd/operator-controller/main.go b/cmd/operator-controller/main.go index 345560bcd..a85421b14 100644 --- a/cmd/operator-controller/main.go +++ b/cmd/operator-controller/main.go @@ -128,12 +128,12 @@ func main() { } if (certFile != "" && keyFile == "") || (certFile == "" && keyFile != "") { - setupLog.Error(nil, "unable to configure TLS certificates: tls-cert and tls-key flags must be used together") + setupLog.Error(fmt.Errorf("unable to configure TLS certificates"), "tls-cert and tls-key flags must be used together") os.Exit(1) } if metricsAddr != "" && certFile == "" && keyFile == "" { - setupLog.Error(nil, "metrics-bind-address requires tls-cert and tls-key flags to be set") + setupLog.Error(fmt.Errorf("unable to configure metrics-bind-address"), "metrics-bind-address requires tls-cert and tls-key flags to be set") os.Exit(1) }