@autofleet/network 1.2.9-alpha-11 → 1.2.9-alpha-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -7
- package/package.json +2 -4
package/index.js
CHANGED
|
@@ -98,15 +98,15 @@ module.exports = class Network {
|
|
|
98
98
|
return response;
|
|
99
99
|
}, (error) => {
|
|
100
100
|
if(error.request._currentRequest.reusedSocket && error.code === 'ECONNRESET') {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
// See https://www.npmjs.com/package/agentkeepalive
|
|
102
|
+
// Support req.reusedSocket
|
|
103
|
+
// https://code-examples.net/en/q/28a8069
|
|
104
|
+
logger.warn('ECONNRESET issue, will retry', {
|
|
105
|
+
req: error.request._currentRequest._currentUrl,
|
|
106
|
+
method: error.request._currentRequest._options.method,
|
|
104
107
|
})
|
|
108
|
+
return axios.request(error.config);
|
|
105
109
|
}
|
|
106
|
-
logger.error('test dor', {
|
|
107
|
-
req: error.request,
|
|
108
|
-
code: error.code,
|
|
109
|
-
})
|
|
110
110
|
logger.error('Finish Request with error', { status: error.status, data: error.response && error.response.data });
|
|
111
111
|
throw error;
|
|
112
112
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/network",
|
|
3
|
-
"version": "1.2.9-alpha-
|
|
3
|
+
"version": "1.2.9-alpha-13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,15 +12,13 @@
|
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@autofleet/logger": "^1.2.3",
|
|
15
|
-
"@autofleet/node-common": "^1.5.1",
|
|
16
15
|
"agentkeepalive": "^4.1.4",
|
|
17
16
|
"axios": "^0.21.1",
|
|
18
17
|
"axios-cache-adapter": "^2.7.3",
|
|
19
18
|
"axios-retry": "^3.1.1",
|
|
20
19
|
"deepmerge": "^3.0.0",
|
|
21
20
|
"dotenv": "^6.0.0",
|
|
22
|
-
"qs": "^6.5.2"
|
|
23
|
-
"undici": "^4.4.4"
|
|
21
|
+
"qs": "^6.5.2"
|
|
24
22
|
},
|
|
25
23
|
"devDependencies": {
|
|
26
24
|
"jest": "^27.0.6",
|