Skip to content

Commit fe3aeac

Browse files
authored
Fix for InvalidLaunchTemplateId.NotFound error (#5665)
1 parent 1fd08c0 commit fe3aeac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/errors/errors.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ import (
2525
)
2626

2727
const (
28-
launchTemplateNotFoundCode = "InvalidLaunchTemplateName.NotFoundException"
28+
launchTemplateNameNotFoundCode = "InvalidLaunchTemplateName.NotFoundException"
2929
)
3030

3131
var (
3232
// This is not an exhaustive list, add to it as needed
3333
notFoundErrorCodes = sets.New[string](
3434
"InvalidInstanceID.NotFound",
35-
launchTemplateNotFoundCode,
35+
launchTemplateNameNotFoundCode,
36+
"InvalidLaunchTemplateId.NotFound",
3637
sqs.ErrCodeQueueDoesNotExist,
3738
iam.ErrCodeNoSuchEntityException,
3839
)
@@ -102,7 +103,7 @@ func IsLaunchTemplateNotFound(err error) bool {
102103
}
103104
var awsError awserr.Error
104105
if errors.As(err, &awsError) {
105-
return awsError.Code() == launchTemplateNotFoundCode
106+
return awsError.Code() == launchTemplateNameNotFoundCode
106107
}
107108
return false
108109
}

0 commit comments

Comments
 (0)