-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 CompleteMultipartUpload returning err with 200 response #501
Comments
Thanks for contacting us @purohit. In this case 200 status code is valid. For long running operations S3 needs to send back the a response or clients will timeout. In these cases the initial API request was successful, such as auth, resource found, ect. Then S3 sends back the status code to prevent the client from disconnecting due to read deadlines. If these long running operations fail after the status code is sent there is no way to send a new status code, so just the error body is returned. It is interesting no Exception code and message are being included in that error message. Could you enable debug logging ( svc := s3.New(session.New(), aws.NewConfig().WithLogLevel(aws.LogDebugWithHTTPBody))
// make requests There doesn't appear to be any outages so I suggest contacting customer support. |
Also, what size of file are you uploading, and are you specifying the |
Hi @jasdel, Region: us-west-2. Thanks for the fast response! It turns out the problem only happens on our Travis-CI builds, not local ones -- which was strange. That indicated that while previously It initially was hard to get the logs because Travis-CI stops logging after 4MB of data, and S3 requires a minimum of 5MB for a multipart upload! But I just modified the client on the fly right before the CompleteMultipartUpload request, and here are the results With Travis (err != nil):
Locally (err == nil):
The file is there from either version, so it seems clear that nothing is actually wrong -- the multipart upload works. I will investigate tomorrow with bisect to see if I can find which commit in Thanks for the tip on the |
@purohit thanks for the update! that was very helpful. I wasn't up to date locally here so missed the change that caused this issue. Looks like the fix to error handling in a3ecfb4 may of caused this bug. Specifically changing the service/s3/unmarshal_error.go's |
I can confirm this also fixed the regression on my end. Thanks for taking care of it. |
Hello,
Since today at 4pm UTC my Travis-CI test using the s3 library has been failing, because I have code like this:
And the status code seems to be 200, but there's still an error issued; the output is:
I feel like there shouldn't be an error returned on a 200. Can you let me know how I should be handling errors, or if this is a bug?
Thanks!
The text was updated successfully, but these errors were encountered: