Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd03fc1

Browse files
committedOct 21, 2020
zones: initial implementation of Zones interface
1 parent 0820db4 commit bd03fc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎pkg/providers/v2/instances.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ func getInstanceByProviderID(ctx context.Context, providerID string, ec2Client E
232232
}
233233

234234
if len(instances) > 1 {
235-
return nil, fmt.Errorf("getInstance: multiple instances found")
235+
return nil, errors.New("getInstance: multiple instances found")
236236
}
237237

238238
state := instances[0].State.Name
239239
if *state == ec2.InstanceStateNameTerminated {
240-
return nil, fmt.Errorf("instance %v is terminated", instances[0].InstanceId)
240+
return nil, cloudprovider.InstanceNotFound
241241
}
242242

243243
return instances[0], nil

0 commit comments

Comments
 (0)
Please sign in to comment.