@autofleet/network 1.2.9-alpha-10 → 1.2.9-alpha-11
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 +8 -1
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const axios = require('axios');
|
|
2
2
|
const axiosRetry = require('axios-retry');
|
|
3
|
-
const
|
|
3
|
+
const Logger = require('@autofleet/logger');
|
|
4
4
|
const qs = require('qs');
|
|
5
5
|
const httpAdapter = require('axios/lib/adapters/http');
|
|
6
6
|
const merge = require('deepmerge');
|
|
@@ -97,8 +97,15 @@ module.exports = class Network {
|
|
|
97
97
|
logger.info(`Finish Request: [${response.config.method.toUpperCase()} ${response.config.url}`);
|
|
98
98
|
return response;
|
|
99
99
|
}, (error) => {
|
|
100
|
+
if(error.request._currentRequest.reusedSocket && error.code === 'ECONNRESET') {
|
|
101
|
+
logger.error('test dor', {
|
|
102
|
+
req: error.request,
|
|
103
|
+
code: error.code,
|
|
104
|
+
})
|
|
105
|
+
}
|
|
100
106
|
logger.error('test dor', {
|
|
101
107
|
req: error.request,
|
|
108
|
+
code: error.code,
|
|
102
109
|
})
|
|
103
110
|
logger.error('Finish Request with error', { status: error.status, data: error.response && error.response.data });
|
|
104
111
|
throw error;
|
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-11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"author": "Dor Shay",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@autofleet/logger": "^1.2.3",
|
|
14
15
|
"@autofleet/node-common": "^1.5.1",
|
|
15
16
|
"agentkeepalive": "^4.1.4",
|
|
16
17
|
"axios": "^0.21.1",
|