Fix: handle Scaleway InvalidRequest for large file CopyObject - #222
Merged
Conversation
Scaleway returns InvalidRequest (not EntityTooLarge) when CopyObject is called on a file larger than 5 GB. The multipart copy fallback was never triggered for Scaleway builds because the error code check only matched EntityTooLarge. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Use message substring 'copy source is larger' instead of the generic error code InvalidRequest, to avoid triggering multipart fallback for unrelated 400 errors. Update production-mode comment to mention both AWS S3 (EntityTooLarge) and Scaleway error signatures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Nit: the comment at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InvalidRequest(notEntityTooLarge) whenCopyObjectis called on a file larger than 5 GBUploadPartCopy) was never triggered on Scaleway because the detection only checked forEntityTooLargescality-adi-1.0.1.iso(10 GB) returned 400 with<Code>InvalidRequest</Code><Message>The specified copy source is larger than the maximum allowable size for a copy source: 5368709120</Message>Test plan
test_copy_via_multipart_copypasses (usesCOPY_OBJECT_SIZE_LIMIT=0to force multipart path)🤖 Generated with Claude Code