Skip to content

Commit 47283d8

Browse files
committed
Fix ValidateCertSecret error message
right now err.Error() renders as ~~~ secrets \"%s not found in namespace %s\" not found ~~~ This changes the msg so that it returns ~~~ secrets \"%s in namespace %s\" not found ~~~ Jira: OSPRH-9991 Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent d5a6fc3 commit 47283d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/common/tls/tls.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func ValidateCACertSecret(
260260
} else if (ctrlResult != ctrl.Result{}) {
261261
return "", k8s_errors.NewNotFound(
262262
appsv1.Resource("Secret"),
263-
fmt.Sprintf("%s not found in namespace %s", caSecret.Name, caSecret.Namespace),
263+
fmt.Sprintf("%s in namespace %s", caSecret.Name, caSecret.Namespace),
264264
)
265265
}
266266

@@ -286,7 +286,7 @@ func (s *Service) ValidateCertSecret(ctx context.Context, h *helper.Helper, name
286286
} else if (ctrlResult != ctrl.Result{}) {
287287
return "", k8s_errors.NewNotFound(
288288
corev1.Resource(corev1.ResourceSecrets.String()),
289-
fmt.Sprintf("%s not found in namespace %s", s.SecretName, namespace),
289+
fmt.Sprintf("%s in namespace %s", s.SecretName, namespace),
290290
)
291291
}
292292

0 commit comments

Comments
 (0)