curfew 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -40,7 +40,7 @@ export const handler = async (event, context) => {
40
40
  } catch (error) {
41
41
  // The signal aborted mid-page: an expected timeout, not a failure.
42
42
  // `curfew` passes handler errors through, so catch it here and resume from the interrupted page.
43
- if (!(error instanceof Error && error.name === 'AbortError')) throw error
43
+ if (!(error instanceof Error && ['AbortError', 'TimeoutError'].includes(error.name))) throw error
44
44
  await reenqueue({ offset })
45
45
  }
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curfew",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Run batches from an (async) iterable and stop before a time budget runs out.",
5
5
  "keywords": [
6
6
  "batch",