Skip to content

Commit 5425895

Browse files
committed
Fix retrying logging message
1 parent 819eab9 commit 5425895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

acme/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ func GetExistingCertificate(ctx context.Context, albArn, domain string) (string,
7373
if err != nil {
7474
var apiErr smithy.APIError
7575
if errors.As(err, &apiErr) && apiErr.ErrorCode() == "AccessDenied" {
76-
log.Printf("Access denied to ALB %v, retrying (%d/10)...", albArn, i+1)
7776
if i >= 10 {
7877
return "", nil, fmt.Errorf("access denied to ALB %v: %w", albArn, err)
7978
}
79+
log.Printf("Access denied to ALB %v, retrying (%d/10)...", albArn, i+1)
8080
SleepWithContext(ctx, 10*time.Second)
8181
continue
8282
}

0 commit comments

Comments
 (0)