Skip to content

Commit

Permalink
security-group show: fix empty response if an API endpoint is misbeha…
Browse files Browse the repository at this point in the history
…ving
  • Loading branch information
tgrondier committed Jan 6, 2025
1 parent 9bae8be commit ecf3e5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ func GetInstancesInSecurityGroup(ctx context.Context, client *v2.Client, securit
return nil
})
if err != nil {
return nil, err
if allInstances == nil {
return nil, err
} else {
fmt.Printf("error while listing instances in security group: %s", err)
}
}

var instancesInSG []*v2.Instance
Expand Down

0 comments on commit ecf3e5d

Please sign in to comment.