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

convertMinioError: stop shadowing minio error with os.ErrNotExist #31

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

ahouene
Copy link
Contributor

@ahouene ahouene commented Mar 21, 2023

convertMinioError would ignore the actual error and return os.ErrNotExist when the StatusCode field of minio error is 404.

Now, os.ErrNotExist and the minio error are wrapped together, allowing to propagate the original meaning of the error.

ahouene added 3 commits March 21, 2023 14:28
`convertMinioError` would ignore the actual error and return `os.ErrNotFound` when the StatusCode field of minio error is 404.
Now, `os.ErrNotFound` and the minio error are wrapped together, allowing to propagate the original meaning of the error.
Copy link
Member

@wojas wojas left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@nvaatstra nvaatstra left a comment

Choose a reason for hiding this comment

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

LGTM; Tested within 2 clients that utilise Simpleblob and both now correctly report:

file does not exist: The specified bucket does not exist

When I try to access a non-existing bucket. Previously I received a misleading file does not exist error without the added context of the bucket not existing.

@wojas wojas merged commit e936c2d into PowerDNS:main Mar 30, 2023
@wojas wojas added this to the v0.2.3 milestone Mar 30, 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.

3 participants