Skip to content

Commit 4ce8fec

Browse files
authored
Join errors when retry token is unavailable (#3121)
1 parent 1eea3db commit 4ce8fec

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"id": "3723ba75-d027-4e70-93f3-6202b10d6edd",
3+
"type": "bugfix",
4+
"description": "Include original error when retry token unavailable",
5+
"collapse": false,
6+
"modules": [
7+
"aws"
8+
]
9+
}

aws/retry/middleware.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func (r *Attempt) handleAttempt(
260260
// Get a retry token that will be released after the
261261
releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err)
262262
if retryTokenErr != nil {
263-
return out, attemptResult, nopRelease, retryTokenErr
263+
return out, attemptResult, nopRelease, errors.Join(err, retryTokenErr)
264264
}
265265

266266
//------------------------------

0 commit comments

Comments
 (0)