Skip to content

Commit

Permalink
s3store: Handle Forbidden as Not Found errors (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimydavis authored Oct 24, 2023
1 parent 5d0f121 commit 4804209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/s3store/s3store.go
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ func (store S3Store) getIncompletePartForUpload(ctx context.Context, uploadId st
Key: store.metadataKeyWithPrefix(uploadId + ".part"),
})

if err != nil && (isAwsError[*types.NoSuchKey](err) || isAwsError[*types.NotFound](err) || isAwsErrorCode(err, "AccessDenied")) {
if err != nil && (isAwsError[*types.NoSuchKey](err) || isAwsError[*types.NotFound](err) || isAwsErrorCode(err, "AccessDenied")) || isAwsErrorCode(err, "Forbidden") {
return nil, nil
}

Expand All @@ -1115,7 +1115,7 @@ func (store S3Store) headIncompletePartForUpload(ctx context.Context, uploadId s
store.observeRequestDuration(t, metricHeadPartObject)

if err != nil {
if isAwsError[*types.NoSuchKey](err) || isAwsError[*types.NotFound](err) || isAwsErrorCode(err, "AccessDenied") {
if isAwsError[*types.NoSuchKey](err) || isAwsError[*types.NotFound](err) || isAwsErrorCode(err, "AccessDenied") || isAwsErrorCode(err, "Forbidden") {
err = nil
}
return 0, err
Expand Down

0 comments on commit 4804209

Please sign in to comment.