-
Notifications
You must be signed in to change notification settings - Fork 692
Add support of error responses in 200 OK body #2115
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
Conversation
5323b55
to
5a11e3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test that returns 200 OK via some mock handler? Otherwise we have currently no way to test this code.
I would also keep the peek reader to have its own tests, move it into pkg/ folder as a package
An S3 server can respond with 200 OK with an S3 Error response, for long standing calls, such as S3 listing when a prefix contains a lot of entries. This commit will support this use case. This can only be enabled with specific calls, that returns XML as a success response, so this will not be confused with GetObject returning a valid document that contains an S3 error response. Supported calls: CompleteMultipartUpload and DeleteMultiObjects.
@harshavardhana I wrote those tests. I also added more fixes to the original code to make those tests passing. minio-go was not retrying SlowDownRead and SlowDownWrite, it is only recognizing SlowDown error code. |
ah we forgot to change support for differentiation here, even AWS SDKs might not retry, perhaps we should change it back and add another field to the error type? |
Talking about server side. |
can you fix the build @vadmeste ? |
Co-authored-by: Harshavardhana <harsha@minio.io>
An S3 server can respond with 200 OK with an S3 Error response, for long standing calls,
such as S3 listing when a prefix contains a lot of entries.
This commit will support this use case. This can only be enabled with specific calls,
that returns XML as a success response, so this will not be confused with GetObject
returning a valid document that contains an S3 error response.
Supported calls: CompleteMultipartUpload and DeleteMultiObjects.