From 8bb5b30b9e41e0d774ed412194504b1b1a842ca8 Mon Sep 17 00:00:00 2001 From: Rishabh Budhiraja Date: Wed, 11 Sep 2019 13:38:54 +0530 Subject: [PATCH] improving error message for service not in default namespace --- pkg/minikube/service/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/service/service.go b/pkg/minikube/service/service.go index 91e537e3fa8f..f088cc97507d 100644 --- a/pkg/minikube/service/service.go +++ b/pkg/minikube/service/service.go @@ -219,7 +219,7 @@ func CheckService(namespace string, service string) error { svc, err := client.Services(namespace).Get(service, meta.GetOptions{}) if err != nil { return &retry.RetriableError{ - Err: errors.Wrapf(err, "Error getting service %s", service), + Err: errors.Wrapf(err), } } if len(svc.Spec.Ports) == 0 { @@ -266,7 +266,7 @@ func WaitAndMaybeOpenService(api libmachine.API, namespace string, service strin chkSVC := func() error { return CheckService(namespace, service) } if err := retry.Expo(chkSVC, time.Duration(interval)*time.Second, time.Duration(wait)*time.Second); err != nil { - return errors.Wrapf(err, "Could not find finalized endpoint being pointed to by %s", service) + return errors.Wrapf(err, "Service %s was not found in default namespace, please try again with 'minikube service %s -n Y'", service, service) } urls, err := GetServiceURLsForService(api, namespace, service, urlTemplate)