From ab13f598950d8c8ea2d3f7c0d8cbfbc027a0f468 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Sat, 15 Jun 2024 11:05:11 +0000 Subject: [PATCH] Return original error on CreateInstance The call to GetInstance masks the error we got from CreateInstance. Signed-off-by: Gabriel Adrian Samfira --- provider/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider/provider.go b/provider/provider.go index bc7b4d5..7f23976 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -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{