Skip to content

Commit 1a7dd56

Browse files
authored
fix: retry on 409 with AWS S3 (#6742)
* retry on 409 with AWS * use ConditionNotMatch error
1 parent 0f2cf3b commit 1a7dd56

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/services/s3/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ pub(super) fn parse_error(resp: Response<Buffer>) -> Error {
4343
403 => (ErrorKind::PermissionDenied, false),
4444
404 => (ErrorKind::NotFound, false),
4545
304 | 412 => (ErrorKind::ConditionNotMatch, false),
46+
// 409 Conflict can be returned e.g. when PutObject with conditions.
47+
// In this case the AWS docs say to retry.
48+
409 => (ErrorKind::ConditionNotMatch, true),
4649
// Service like R2 could return 499 error with a message like:
4750
// Client Disconnect, we should retry it.
4851
499 => (ErrorKind::Unexpected, true),

0 commit comments

Comments
 (0)