@nxtedition/lib 14.1.16 → 14.1.17
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/package.json +1 -1
- package/undici.js +4 -2
package/package.json
CHANGED
package/undici.js
CHANGED
|
@@ -80,8 +80,9 @@ module.exports.request = async function request(
|
|
|
80
80
|
try {
|
|
81
81
|
/* eslint-disable no-unreachable-loop */
|
|
82
82
|
for (let retryCount = 0; true; retryCount++) {
|
|
83
|
+
let ures
|
|
83
84
|
try {
|
|
84
|
-
|
|
85
|
+
ures = await undici.request(url, {
|
|
85
86
|
method,
|
|
86
87
|
reset,
|
|
87
88
|
body,
|
|
@@ -97,7 +98,6 @@ module.exports.request = async function request(
|
|
|
97
98
|
upstreamLogger?.debug({ ureq, ures }, 'upstream request response')
|
|
98
99
|
|
|
99
100
|
if (ures.statusCode >= 300 && ures.statusCode < 400) {
|
|
100
|
-
await ures.body.dump()
|
|
101
101
|
throw new Error('maxRedirections exceeded')
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -111,6 +111,8 @@ module.exports.request = async function request(
|
|
|
111
111
|
|
|
112
112
|
return ures
|
|
113
113
|
} catch (err) {
|
|
114
|
+
await ures?.body.dump()
|
|
115
|
+
|
|
114
116
|
if (retryCount >= maxRetries) {
|
|
115
117
|
throw err
|
|
116
118
|
}
|