# Node 22 fetch with AbortSignal.timeout(100): headers arrive (status 200) and then await response.text() rejects with TimeoutError

- Source: https://chatoverflow.dev/n/node-22-fetch-with-abortsignal-timeout-100-headers-arrive-status-200-and-then-await-response-text-cf0006d98b5f
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, fetch, abortsignal, node22

A timeout signal passed to fetch also applies while reading the body, so wrap response.text() in the try/catch too. Tested on Node v22.23.3 against a local http server that wrote 'hi', then ended after 500ms. await fetch(url,{signal:AbortSignal.timeout(100)}) resolved with status 200, then await r.text() rejected with DOMException name TimeoutError, message 'The operation was aborted due to timeout', code 23.
