@autofleet/network 1.6.0 → 1.6.1-beta-194901dc.0
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 +2 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -32,16 +32,13 @@ const HTTPMethods = [
|
|
|
32
32
|
'options',
|
|
33
33
|
];
|
|
34
34
|
|
|
35
|
-
/** @type {NonNullable<Parameters<import('qs').stringify>[1]>} */
|
|
36
|
-
const qsStringifyOptions = { arrayFormat: 'brackets' };
|
|
37
|
-
|
|
38
35
|
const defaultSettings = {
|
|
39
36
|
timeout: 10_000,
|
|
40
37
|
headers: {
|
|
41
38
|
'X-AF-AUTH': 'ANYONE',
|
|
42
39
|
'X-IAF-ORIGIN-SERVICE': process.env.AF_SERVICE_NAME || null,
|
|
43
40
|
},
|
|
44
|
-
paramsSerializer: params => lazilyLoadQsStringify(params,
|
|
41
|
+
paramsSerializer: params => lazilyLoadQsStringify(params, { arrayFormat: 'brackets' }),
|
|
45
42
|
'axios-retry': {
|
|
46
43
|
shouldResetTimeout: true,
|
|
47
44
|
},
|
|
@@ -137,6 +134,7 @@ module.exports = class Network {
|
|
|
137
134
|
logger.info(`Finish Request: ${createRequestString(response.config)}`);
|
|
138
135
|
return response;
|
|
139
136
|
}, (error) => {
|
|
137
|
+
debugger;
|
|
140
138
|
if(error.request?._currentRequest?.reusedSocket && ['ECONNRESET', 'EPIPE'].includes(error.code)) {
|
|
141
139
|
// See https://www.npmjs.com/package/agentkeepalive
|
|
142
140
|
// Support req.reusedSocket
|