Skip to content

Commit 1f8ca6c

Browse files
authored
Include API error message in cluster update retry (#3872)
## Why I saw this error in an integration test and the underlying cause was missing. ## Tests We don't have an existing acceptance test for this and need to capture the set of possible errors first.
1 parent 50607e1 commit 1f8ca6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundle/direct/dresources/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (r *ResourceCluster) DoUpdate(ctx context.Context, id string, config *compu
9898
// Only Running and Terminated clusters can be modified. In particular, autoscaling clusters cannot be modified
9999
// while the resizing is ongoing. We retry in this case. Scaling can take several minutes.
100100
if errors.As(err, &apiErr) && apiErr.ErrorCode == "INVALID_STATE" {
101-
return nil, retries.Continues(fmt.Sprintf("cluster %s cannot be modified in its current state", id))
101+
return nil, retries.Continues(fmt.Sprintf("cluster %s cannot be modified in its current state: %s", id, apiErr.Message))
102102
}
103103
return nil, retries.Halt(err)
104104
})

0 commit comments

Comments
 (0)