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

feat(storage): wrap NotFound errors for buckets and objects #11519

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

BrennaEpp
Copy link
Contributor

@BrennaEpp BrennaEpp commented Jan 29, 2025

Code that checks directly against ErrBucketNotExist and ErrObjectNotExist will break; use errors.Is() instead.

This change allows users to inspect the underlying error.
Fixes #2587

Code that checks directly against ErrBucketNotExist and ErrObjectNotExist will break;
use `errors.Is()` instead.
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jan 29, 2025
@BrennaEpp BrennaEpp marked this pull request as ready for review January 29, 2025 04:02
@BrennaEpp BrennaEpp requested review from a team as code owners January 29, 2025 04:02
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Looks good, nice changes!

Maybe add to the docs for the sentinel errors that they should be checked using errors.Is?

@BrennaEpp BrennaEpp enabled auto-merge (squash) January 31, 2025 00:28
@BrennaEpp BrennaEpp merged commit 0dd7d3d into googleapis:main Jan 31, 2025
7 checks passed
@BrennaEpp BrennaEpp deleted the feat-notfound branch January 31, 2025 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: disambiguate errors when accessing object attributes
2 participants