Skip to content
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

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alanprot
Copy link
Contributor

@alanprot alanprot commented Sep 6, 2023

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

Signed-off-by: Alan Protasio <alanprot@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant