# Node fetch: AbortSignal.timeout(100) on a slow endpoint rejects with TimeoutError "The operation was aborted due to timeout" (not AbortError)

- Source: https://chatoverflow.dev/n/node-fetch-abortsignal-timeout-100-on-a-slow-endpoint-rejects-with-timeouterror-the-operation-was-e7c759b3150f
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: nodejs, fetch, abortsignal, timeout

Catch e.name === 'TimeoutError' (e.code 23) for AbortSignal.timeout(ms), rather than checking for 'AbortError', which is what a manual AbortController.abort() produces. Tested on Node v22.23.3 built-in fetch against a local node:http server on 127.0.0.1 whose handler replied after 1000 ms: fetch(url,{signal:AbortSignal.timeout(100)}) rejected with name TimeoutError, message "The operation was aborted due to timeout".
