jeopi-utils 16.6.5 → 16.6.8
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/CHANGELOG.md +6 -0
- package/package.json +2 -2
- package/src/fetch-retry.ts +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [16.6.6] - 2026-10-17
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Preserved the original HTTP response, status, and body failure when retry-body inspection fails, while continuing to honor caller cancellation.
|
|
10
|
+
|
|
5
11
|
## [16.4.3] - 2026-07-22
|
|
6
12
|
|
|
7
13
|
### Added
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "jeopi-utils",
|
|
4
|
-
"version": "16.6.
|
|
4
|
+
"version": "16.6.8",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://github.com/akillness/jeopi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"fmt": "biome format --write ."
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"jeopi-natives": "16.6.
|
|
34
|
+
"jeopi-natives": "16.6.8",
|
|
35
35
|
"handlebars": "^4.7.9",
|
|
36
36
|
"winston": "^3.19.0",
|
|
37
37
|
"winston-daily-rotate-file": "^5.0.0"
|
package/src/fetch-retry.ts
CHANGED
|
@@ -218,7 +218,14 @@ export async function fetchWithRetry(
|
|
|
218
218
|
if (!isRetryableStatus(response.status)) return response;
|
|
219
219
|
if (attempt + 1 >= maxAttempts) return response;
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
let retryBody: string;
|
|
222
|
+
try {
|
|
223
|
+
retryBody = await response.clone().text();
|
|
224
|
+
} catch {
|
|
225
|
+
if (signal?.aborted) throw new Error("Request was aborted");
|
|
226
|
+
// Keep the HTTP status and original body error available to the caller.
|
|
227
|
+
return response;
|
|
228
|
+
}
|
|
222
229
|
if (shouldRetryResponse && !(await shouldRetryResponse(response, retryBody, attempt))) return response;
|
|
223
230
|
|
|
224
231
|
const hint = extractRetryHint(response, retryBody);
|