-
Notifications
You must be signed in to change notification settings - Fork 374
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
fix(storage): better error code for CreateBucket() and 409 errors #10480
fix(storage): better error code for CreateBucket() and 409 errors #10480
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov ReportBase: 93.94% // Head: 93.94% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #10480 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 1626 1626
Lines 147461 147482 +21
=======================================
+ Hits 138530 138554 +24
+ Misses 8931 8928 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
It seems that 409 should be treated as a `kAlreadyExists` in this case, and this case only.
6888190
to
b98386f
Compare
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
return google::cloud::internal::WithStatusCode(std::move(response).status(), | ||
StatusCode::kAlreadyExists); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q. Could we, almost as effectively, avoid the extra Status
complications with just ...
return Status(StatusCode::kAlreadyExists, response.status().message(),
response.status().error_info());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to avoid the extra copies, but meh. This is not happening on each call or anything.
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
It seems that 409 should be treated as a
kAlreadyExists
in this case, and this case only.Fixes #10478
This change is