From a4a30bb8dd3f4939dbff04bb5d703072800941ff Mon Sep 17 00:00:00 2001 From: Simon Woolf Date: Thu, 2 Feb 2023 19:03:36 +0000 Subject: [PATCH] Node/http: stop got from doing its own retries --- src/platform/nodejs/lib/util/http.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/nodejs/lib/util/http.ts b/src/platform/nodejs/lib/util/http.ts index c220fea2e4..0b2c3307d2 100644 --- a/src/platform/nodejs/lib/util/http.ts +++ b/src/platform/nodejs/lib/util/http.ts @@ -223,6 +223,10 @@ const Http: typeof IHttp = class { doOptions.url = uri; doOptions.timeout = { request: ((rest && rest.options.timeouts) || Defaults.TIMEOUTS).httpRequestTimeout }; + // We have our own logic that retries appropriate statuscodes to fallback endpoints, + // with timeouts constructed appropriately. Don't want `got` doing its own retries to + // the same endpoint, inappropriately retrying 429s, etc + doOptions.retry = { limit: 0 }; (got[method](doOptions) as CancelableRequest) .then((res: Response) => {