Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

fix: do not pass retry options to fetch #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down