diff --git a/controllers/registry.go b/controllers/registry.go index 02c102fd8bf..31f23e978a6 100644 --- a/controllers/registry.go +++ b/controllers/registry.go @@ -474,8 +474,8 @@ func (r *DPAReconciler) getMatchedKeyValue(key string, s string) (string, error) s = strings.TrimPrefix(s, prefix) } if len(s) == 0 { - r.Log.Info("Could not parse secret for %s", key) - return s, errors.New(key + " secret parsing error") + r.Log.Info(fmt.Sprintf("Could not parse secret for %s", key)) + return s, errors.New("secret parsing error in key " + key) } return s, nil }