Skip to content

Commit

Permalink
fix: handle error when listing machines
Browse files Browse the repository at this point in the history
Signed-off-by: Cyrill Troxler <[email protected]>
  • Loading branch information
ctrox committed Nov 20, 2023
1 parent 88a2bba commit b773840
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,12 @@ func (ng *nodeGroup) listMachines() ([]unstructured.Unstructured, error) {
LabelSelector: fmt.Sprintf("%s=%s-%s", machineDeploymentNameLabelKey, ng.provider.config.ClusterName, ng.name),
},
)
if err != nil {
return nil, fmt.Errorf("could not list machines: %w", err)
}

ng.machines = machinesList.Items
return machinesList.Items, err
return machinesList.Items, nil
}

func (ng *nodeGroup) machineByName(name string) (*unstructured.Unstructured, error) {
Expand Down

0 comments on commit b773840

Please sign in to comment.