retry-axios icon indicating copy to clipboard operation
retry-axios copied to clipboard

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

Open code-abil opened this issue 5 years ago • 0 comments

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 avatar Jun 27 '20 17:06 code-abil