boto/botocore — pull request #298 by jamesls (2014-06-02 19:57:11+00:00)
Title: Handle case where S3 returns a 200 error response

From http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html:

There are two opportunities for a copy request to return an error. One
can occur when Amazon S3 receives the copy request and the other can
occur while Amazon S3 is copying the files. If the error occurs before
the copy operation starts, you receive a standard Amazon S3 error. If the
error occurs during the copy operation, the error response is embedded in
the 200 OK response. This means that a 200 OK response can contain either
a success or an error. Make sure to design your application to parse the
contents of the response and handle it appropriately.

Operations that need this behavior:

- CompleteMultipartUpload
- CopyObject
- UploadPartCopy

The fix here is to switch the status code to 500, because, for all
intents and purposes, this is an error response. This ensures it
goes through our normal 5xx retry logic and exception handling/raising
code.

cc @danielgtaylor