Skip to content

Commit

Permalink
improved create service error message
Browse files Browse the repository at this point in the history
  • Loading branch information
odra committed Jul 26, 2019
1 parent 7d1594d commit 5fec4bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kn/commands/service/service_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5fec4bf

Please sign in to comment.