Implement a helper function on the S3 package to parse the S3 errors Responses #74
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.
Creating a new method on the S3 package to return a parsed
s3 error response
.This method can be useful when a code that uses this package needs to take an action depending on the error returned by S3.
Currently the caller code can get access to this information by invoking
minio.ToErrorResponse(errors.Cause(err))
but seems to break the encapsulation (ideally the s3 implementation can be swapped from minio to any other lib without breaking the consumers of this lib).Changes
ToErrorResponse
function to return the parsed S3 ErrorResponse.Verification