HttpStorageRpc#getCurrentUploadOffset uses 0 as error code in StorageException #687
Labels
api: storage
Issues related to the googleapis/java-storage API.
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.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please include as much information as possible:
Environment details
General, Core, and Other are also allowed as types
Steps to reproduce
Code example
// example
Stack trace
External references such as API reference guides
Any additional information below
I am using https://github.com/googleapis/java-storage/blob/v1.113.9/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java#L2673 to stream uploads.
Occasionally 503 response code is returned when executing https://github.com/googleapis/java-storage/blob/v1.113.9/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java#L752 and 0 is used as the error code when throwing a
StorageException
. If I understand correctly the error code is used to determine when to retry and 0 is not part of the retry-able error codes (https://github.com/googleapis/java-storage/blob/v1.113.9/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageException.java#L40), but in this case we should retry 503s.The text was updated successfully, but these errors were encountered: