Skip to content

Add retry logic to file.download because it fails with 504 often #1635

@surjikal

Description

@surjikal

Is your feature request related to a problem? Please describe.

My file.download calls often fail with 504 gatewayTimeout.
Guesstimating that this happens 1-5% of the time, over 1000s of calls per day.

Describe the solution you'd like

It would be nice if file.download had the same kind of retry handling that file.save has.

Describe alternatives you've considered

I have implemented my own retry logic on top of this library, and it's similar to how the retry logic is implemented for file.save.


Here's the relevant part of the error object I'm seeing:

 ApiError {
  code: 504,
  errors: [ { message: '', domain: 'global', reason: 'gatewayTimeout' } ],
  response: PassThrough {
    _readableState: ReadableState {
      objectMode: false,
...

Metadata

Metadata

Labels

api: storageIssues related to the googleapis/nodejs-storage API.needs more infoThis issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions