@upyo/retry 0.5.0-dev.193 → 0.5.0-dev.195

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/dist/index.cjs CHANGED
@@ -230,7 +230,6 @@ var RetryTransport = class {
230
230
  try {
231
231
  startLaunch();
232
232
  while (inFlight.size > 0 || completed.has(nextYieldIndex) || launchPromise != null || !inputDone) {
233
- if (hasLaunchError) throw launchError;
234
233
  while (completed.has(nextYieldIndex)) {
235
234
  const result$1 = completed.get(nextYieldIndex);
236
235
  completed.delete(nextYieldIndex);
@@ -240,6 +239,7 @@ var RetryTransport = class {
240
239
  nextYieldIndex++;
241
240
  startLaunch();
242
241
  }
242
+ if (hasLaunchError) throw launchError;
243
243
  startLaunch();
244
244
  if (inFlight.size <= 0 && launchPromise == null) break;
245
245
  const launch = launchPromise?.then(() => ({ launched: true }));
@@ -354,7 +354,11 @@ var RetryTransport = class {
354
354
  attempts
355
355
  });
356
356
  const message = error instanceof Error ? error.message : String(error);
357
- const classification = (0, __upyo_core.classifyReceiptError)(error);
357
+ const classification = error instanceof Error && error.name === "AbortError" ? {
358
+ category: "timeout",
359
+ code: "timeout",
360
+ retryable: true
361
+ } : (0, __upyo_core.classifyReceiptError)(error);
358
362
  return (0, __upyo_core.createFailedReceipt)((0, __upyo_core.createReceiptError)(message, {
359
363
  provider: this.id,
360
364
  category: classification.category,
package/dist/index.js CHANGED
@@ -207,7 +207,6 @@ var RetryTransport = class {
207
207
  try {
208
208
  startLaunch();
209
209
  while (inFlight.size > 0 || completed.has(nextYieldIndex) || launchPromise != null || !inputDone) {
210
- if (hasLaunchError) throw launchError;
211
210
  while (completed.has(nextYieldIndex)) {
212
211
  const result$1 = completed.get(nextYieldIndex);
213
212
  completed.delete(nextYieldIndex);
@@ -217,6 +216,7 @@ var RetryTransport = class {
217
216
  nextYieldIndex++;
218
217
  startLaunch();
219
218
  }
219
+ if (hasLaunchError) throw launchError;
220
220
  startLaunch();
221
221
  if (inFlight.size <= 0 && launchPromise == null) break;
222
222
  const launch = launchPromise?.then(() => ({ launched: true }));
@@ -331,7 +331,11 @@ var RetryTransport = class {
331
331
  attempts
332
332
  });
333
333
  const message = error instanceof Error ? error.message : String(error);
334
- const classification = classifyReceiptError(error);
334
+ const classification = error instanceof Error && error.name === "AbortError" ? {
335
+ category: "timeout",
336
+ code: "timeout",
337
+ retryable: true
338
+ } : classifyReceiptError(error);
335
339
  return createFailedReceipt(createReceiptError(message, {
336
340
  provider: this.id,
337
341
  category: classification.category,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upyo/retry",
3
- "version": "0.5.0-dev.193",
3
+ "version": "0.5.0-dev.195",
4
4
  "description": "Retry and backoff decorator transport for Upyo email library",
5
5
  "keywords": [
6
6
  "email",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "sideEffects": false,
56
56
  "peerDependencies": {
57
- "@upyo/core": "0.5.0-dev.193+eb1e84b9"
57
+ "@upyo/core": "0.5.0-dev.195+5d1ba2de"
58
58
  },
59
59
  "devDependencies": {
60
60
  "tsdown": "^0.12.7",