Pass PutWarmPool error to TryAgainLaterError

This commit is contained in:
Peter Rifel 2023-07-28 18:50:19 -05:00
parent bf47eedcb3
commit 99d2f23054
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ func (*WarmPool) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *WarmPool) error
_, err := svc.PutWarmPool(request)
if err != nil {
if awsup.AWSErrorCode(err) == "ValidationError" {
return fi.NewTryAgainLaterError("waiting for ASG to become ready")
return fi.NewTryAgainLaterError("waiting for ASG to become ready").WithError(err)
}
return fmt.Errorf("error modifying warm pool: %w", err)
}