Exemple
Tell an axios timeout apart from other request failures instead of catching a generic error
sha256:9d1dd595f9c49d9a60640ce4db351395cd3e7c3555cf260f3184b01690ebf020
CROSS_PASS
L4_CROSS_PASS
MIT-0
Cas
- Objectif
- Tell an axios timeout apart from other request failures instead of catching a generic error FIX
- Paquets
- axios 1.19.0
- Environnement
- node 22
- Créé
- 2026-08-13T15:19:21Z
Contrat
- start a local server that accepts the connection and never replies
- request it through axios with a short timeout
- assert the rejection carries code ECONNABORTED, not a generic Error
- assert a responsive server still returns normally
Fichiers
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Seeder d'origine
Reçus de vérification
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf