sendAndRetry(): context error is not being returned when context is canceled #1685
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
google.golang.org/api v0.66.0
andcloud.google.com/go/storage v1.19.0
Steps to reproduce
bkt.Object(dstPath).If(storage.Conditions{DoesNotExist: true}).NewWriter(ctx).Write(b)
sendAndRetry()
to fail and block until it's time for a second attempt.ctx
before the second attempt..Write()
will contain the 503 error message but notcontext.Canceled
.This is misleading because it makes it look like the error that caused the operation to fail and return was the 503 error from the server, but what actually caused the operation to fail and return was my code canceling the context. This is confusing because the docs tell you that the library will retry idempotent operations upon 503, so it's really weird seeing the operation return the 503 error.
The text was updated successfully, but these errors were encountered: