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

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

@ivarconr

Description

@ivarconr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions