Skip to content

Commit

Permalink
Fix error message formats
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Laine <[email protected]>
  • Loading branch information
Philip Laine committed Apr 21, 2021
1 parent c27e013 commit a98961f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/provider_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ func (r *ProviderReconciler) validate(ctx context.Context, provider v1beta1.Prov

caFile, ok := secret.Data["caFile"]
if !ok {
return fmt.Errorf("no caFile found in secret %q", provider.Spec.CertSecretRef.Name)
return fmt.Errorf("no caFile found in secret %s", provider.Spec.CertSecretRef.Name)
}

certPool = x509.NewCertPool()
ok = certPool.AppendCertsFromPEM(caFile)
if !ok {
return fmt.Errorf("could not append to cert pool")
return fmt.Errorf("could not append to cert pool: invalid CA found in %s", provider.Spec.CertSecretRef.Name)
}
}

Expand Down

0 comments on commit a98961f

Please sign in to comment.