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

refactor: change the bucket return error type #18

Closed
wants to merge 1 commit into from

Conversation

jackgris
Copy link

What kind of change does this PR introduce?

Example to manage Bucket errors in a different way.

What is the current behavior?

Related to the issue #17

What is the new behavior?

The idea is to remove "panics" and return a custom error that satisfies the error interface.

Signed-off-by: Gabriel Pozo <jackgris2@gmail.com>
}

type MessageResponse struct {
Message string `json:"message"`
}

type BucketResponseError struct {
Error string `json:"error"`
Errors string `json:"error"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is better to retain it as error because, given the multitude of errors, it should be an array of strings or structs.

Copy link
Contributor

@tranhoangvuit tranhoangvuit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for your contribute. Let update a bit and merge it. I will continue with error of the rest.

@jackgris
Copy link
Author

jackgris commented Oct 8, 2023

This was fixed with the pull request #20

@jackgris jackgris closed this Oct 8, 2023
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.

2 participants