objstore icon indicating copy to clipboard operation
objstore copied to clipboard

Implement a helper function on the S3 package to parse the S3 errors Responses

Open alanprot opened this issue 2 years ago • 0 comments

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).

  • [ x ] I added CHANGELOG entry for this change.
  • [ ] Change is not relevant to the end user.

Changes

  • S3: Implementing ToErrorResponse function to return the parsed S3 ErrorResponse.

Verification

alanprot avatar Sep 06 '23 01:09 alanprot