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

bug: opts.retry should not be passed to fetch #40

Open
ivarconr opened this issue Feb 19, 2021 · 0 comments · May be fixed by #41
Open

bug: opts.retry should not be passed to fetch #40

ivarconr opened this issue Feb 19, 2021 · 0 comments · May be fixed by #41

Comments

@ivarconr
Copy link

Hi there 👋 ,

According to the docs, you may add opts.retry to fetch like this:

const opts = { retry: {
  retries: 3,
}};
await fetch('url', opts)

But this actually ends up passing the retry directly to fetch as well, even if this is not a valid option in fetch. It is nice that you can override the retry options per fetch invocation, but it would be good if this was not passed to fetch. This causes errors in combination with the nock test tool, as it will not be able to intercept the call anymore.

Suggestion Solution:
fetch-retry should not pass retry options to fetch. This can be done by removing opts.retry before passing it to fetch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant