Gathering detailed insights and metrics for axios-retry-tiny
Gathering detailed insights and metrics for axios-retry-tiny
Gathering detailed insights and metrics for axios-retry-tiny
Gathering detailed insights and metrics for axios-retry-tiny
npm install axios-retry-tiny
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
11 Commits
3 Watching
1 Branches
1 Contributors
Updated on 15 Feb 2022
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-66.7%
2
Compared to previous day
Last week
-9%
71
Compared to previous week
Last month
-15.6%
232
Compared to previous month
Last year
-1.3%
1,903
Compared to previous year
A tiny interceptor for axios to retry request
1npm i axios-retry-tiny --save 2# or use yarn 3yarn add axios-retry-tiny
1const axios = require('axios'); 2const artiny = require('axios-retry-tiny'); 3artiny(axios); 4 5(async () => { 6 try { 7 await axios({ 8 url: 'https://google.com', 9 method: 'get', 10 retry: 5, 11 retryDelay: 100, 12 retryCode: ['ECONNABORTED', 'ETIMEDOUT', 500], 13 retryBeforeFn: (e) => { 14 console.log(`retry #${e.config.__retryCount}: ${e.config.url} : errCode: ${e.code || (e.response && e.response.status)}`); 15 } 16 }); 17 } catch (error) { 18 console.log(error); 19 } 20})();
option | type | default | desc |
---|---|---|---|
retry | number | 3 | times to retry |
retryDelay | number | 50 | ms time to delay retry |
retryCode | [number, string] | all error code | the match axios error code to retry |
retryBeforeFn | function(config) | the function before retry, can get axios config |
code | type | desc |
---|---|---|
'ECONNABORTED' | string | timeout |
'ETIMEDOUT' | string | timeout |
'ENOTFOUND' | string | server not found |
'ENETUNREACH' | string | not reach |
4** | number | client error |
5** | number | server error |
Happy to thinks
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More