How to use is-retry-allowed - 1 common examples

To help you get started, we’ve selected a few is-retry-allowed examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github softonic / axios-retry / es / index.js View on Github external
export function isNetworkError(error) {
  return (
    !error.response &&
    Boolean(error.code) && // Prevents retrying cancelled requests
    error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests
    isRetryAllowed(error)
  ); // Prevents retrying unsafe errors
}

is-retry-allowed

Check whether a request can be retried based on the `error.code`

MIT
Latest version published 4 years ago

Package Health Score

74 / 100
Full package analysis

Popular is-retry-allowed functions