Skip to content

Commit

Permalink
improve error message if cluster ID does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Jan 23, 2024
1 parent e7d21ea commit 99d76d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (c *HCPConnectCommand) getCluster(organizationID string, projectID string,
clusterResp, err := c.vsClient.Get(clusterGetReq, nil)
switch {
case err != nil:
return "", err
return "", errors.New(fmt.Sprintf("Failed to get cluster %s: %s", clusterID, err))
case clusterResp.GetPayload() == nil:
return "", errors.New("payload is nil")
default:
Expand Down

0 comments on commit 99d76d2

Please sign in to comment.