From 7bc7d5616568f4dc0eb497cf74f7375a28354d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 19 Feb 2021 19:34:41 +0100 Subject: [PATCH] fix: do not pass retry options to fetch --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e5eeb35..81b36de 100644 --- a/index.js +++ b/index.js @@ -49,7 +49,8 @@ function setup(fetch) { const { method = 'GET' } = opts; try { // this will be retried - const res = await fetch(url, opts); + const { retry, onRetry, ...fetchOpts } = opts; + const res = await fetch(url, fetchOpts); debug('status %d', res.status); if ((res.status >= 500 && res.status < 600) || res.status === 429) { // NOTE: doesn't support http-date format