CodeSampleX

Sample

undici 8.10.0: Configure and dispatch requests through interceptors.retry and compose in undici 8.10.0

Verified sample for npm undici 8.10.0: Configure and dispatch requests through interceptors.retry and compose in undici 8.10.0. The contract ran on node 22 …

sha256:2cd49c6b88dad9c2216381ada255b3513e586b0e8aef278c1b3f5ff37bb326db

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment node linux x64 node node npm

Verification-run environments

Environment Contract Stages Run
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-17
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

Case

HOW
Goal
Configure and dispatch requests through interceptors.retry and compose in undici 8.10.0
Packages
Symbols
  • interceptors.retry
  • Dispatcher.prototype.compose
  • interceptors.redirect
Environment
node
Created
2026-08-17T18:09:44Z

Contract

  1. When retries on 5xx responses are exhausted, agent.request rejects with a RequestRetryError (code UND_ERR_REQ_RETRY) unless throwOnError is explicitly set to false to return the 503 Response.
  2. Retries transient 503 responses for idempotent GET requests and resolves the subsequent 200 response
  3. Non-idempotent POST requests that receive 503 are not retried by default and throw immediately on the first attempt
  4. Composing interceptors.retry before interceptors.redirect places redirect on the outer layer, retrying failed target endpoints directly without re-requesting the initial redirect origin

Files

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • test/contract.mjs

Download the source artifact (tar.gz)

Origin Seeder

csx-seed