Skip to content

Commit

Permalink
Return original error on CreateInstance
Browse files Browse the repository at this point in the history
The call to GetInstance masks the error we got from CreateInstance.

Signed-off-by: Gabriel Adrian Samfira <[email protected]>
  • Loading branch information
gabriel-samfira committed Jun 15, 2024
1 parent 758cd48 commit ab13f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (a *AwsProvider) CreateInstance(ctx context.Context, bootstrapParams params

instanceID, err := a.awsCli.CreateRunningInstance(ctx, spec)
if err != nil {
return a.GetInstance(ctx, instanceID)
return params.ProviderInstance{}, fmt.Errorf("failed to create instance: %w", err)
}

instance := params.ProviderInstance{
Expand Down

0 comments on commit ab13f59

Please sign in to comment.