gcloud-node

Does gcloud-node have a way to set the http timeout for uploading files to storage?


I'm uploading small files (via Bucket.upload), and occasionally I get a 503 or 500 from the google backend, but it usually returns that after ~5 or ~10 seconds (I assume it's the timeout on google's end). I noticed in gcloud-node util it sets the request timeout to 60 seconds, but I don't see to be able to find a way to set the timeout myself.

Thanks!


Solution

  • On my phone while playing with Mickey Mouse figurines with my daughter, so my answer can't be too long. Check out Request interceptors: https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.28.0/gcloud

    Hopefully that helps!