From 5fec4bfad46930ca9da8e7830c30756052f6c480 Mon Sep 17 00:00:00 2001 From: Leonardo Rossetti Date: Fri, 26 Jul 2019 23:14:34 +0100 Subject: [PATCH] improved create service error message --- pkg/kn/commands/service/service_create.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/kn/commands/service/service_create.go b/pkg/kn/commands/service/service_create.go index 6d7f575792..64ef04505f 100644 --- a/pkg/kn/commands/service/service_create.go +++ b/pkg/kn/commands/service/service_create.go @@ -134,6 +134,9 @@ func flush(out io.Writer) { func createService(client v1alpha1.KnClient, service *serving_v1alpha1_api.Service, namespace string, out io.Writer) error { err := client.CreateService(service) if err != nil { + if api_errors.IsNotFound(err) { + return errors.New("Error: knative serving is not installed on the connected backend. Please verify your Knative installation") + } return err } fmt.Fprintf(out, "Service '%s' successfully created in namespace '%s'.\n", service.Name, namespace)