@nxtedition/lib 14.1.5 → 14.1.7
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/app.js +2 -0
- package/package.json +1 -1
- package/undici.js +3 -3
package/app.js
CHANGED
|
@@ -143,6 +143,8 @@ module.exports = function (appConfig, onTerminate) {
|
|
|
143
143
|
)
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
logger.debug({ data: JSON.stringify(config, null, 2) }, 'config')
|
|
147
|
+
|
|
146
148
|
{
|
|
147
149
|
const { isMainThread, parentPort } = require('node:worker_threads')
|
|
148
150
|
if (!isMainThread && parentPort) {
|
package/package.json
CHANGED
package/undici.js
CHANGED
|
@@ -17,8 +17,8 @@ module.exports.request = async function request(
|
|
|
17
17
|
headersTimeout,
|
|
18
18
|
bodyTimeout,
|
|
19
19
|
reset = false,
|
|
20
|
-
method = 'GET',
|
|
21
20
|
body,
|
|
21
|
+
method = body ? 'POST' : 'GET',
|
|
22
22
|
userAgent,
|
|
23
23
|
headers,
|
|
24
24
|
}
|
|
@@ -109,13 +109,13 @@ module.exports.request = async function request(
|
|
|
109
109
|
const delay =
|
|
110
110
|
parseInt(err.headers?.['Retry-After']) * 1e3 || Math.min(10e3, retryCount * 1e3 + 1e3)
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
upstreamLogger?.warn({ err, retryCount, delay }, 'upstream request retrying')
|
|
113
113
|
|
|
114
114
|
return tp.setTimeout(delay, undefined, { signal })
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
} catch (err) {
|
|
118
|
-
|
|
118
|
+
upstreamLogger?.error({ err }, 'upstream request failed')
|
|
119
119
|
throw err
|
|
120
120
|
}
|
|
121
121
|
}
|