Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'shouldRetry' and 'retry' together are not working fine. #117

Open
code-abil opened this issue Jun 27, 2020 · 0 comments
Open

'shouldRetry' and 'retry' together are not working fine. #117

code-abil opened this issue Jun 27, 2020 · 0 comments

Comments

@code-abil
Copy link

Independently both "shouldRetry"and "retry" work fine.
When put together, "retry" loses it significance.

`
raxConfig: {

    retry: 5,

    shouldRetry: (err) => {
          if(condition)  return true;
          else return false;
    },

    onRetryAttempt: (err) => {
      return true;
    },
  },

`

For the above raxConfig, it doesn't stop after 5 retries. It retries infinitely.

@code-abil code-abil changed the title shouldRetry and retry together are not working fine. 'shouldRetry' and 'retry' together are not working fine. Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant