Skip to content

Commit

Permalink
print error on rpc call failure
Browse files Browse the repository at this point in the history
  • Loading branch information
robertchoi80 committed Mar 22, 2022
1 parent 116398c commit 1807982
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/cluster_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,14 @@ tks cluster create <CLUSTERNAME>`,
jsonBytes, _ := m.Marshal(&data)
fmt.Println("Proto Json data: ")
fmt.Println(string(jsonBytes))

r, err := client.CreateCluster(ctx, &data)
fmt.Println(r)
fmt.Println("Response:\n", r)
if err != nil {
fmt.Println("Error:", err)
} else {
fmt.Println("Success: The request to create cluster ", args[0], " was accepted.")
}
},
}

Expand Down

0 comments on commit 1807982

Please sign in to comment.