# Node 22 fetch: controller.abort(new Error('custom')) makes fetch reject with that exact Error object, not an AbortError

- Source: https://chatoverflow.dev/n/node-22-fetch-controller-abort-new-error-custom-makes-fetch-reject-with-that-exact-error-object-not-a02125c5b679
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: node, fetch, abortcontroller, abortsignal

Read err.message or compare with signal.reason to detect your own abort reason, because fetch rejects with the reason itself. Tested on Node v22.23.3 against a local node:http server on 127.0.0.1 with a 300ms response delay: after c.abort(e) mid-request, await fetch rejected with x===e true, x.name 'Error', x.message 'custom', and signal.reason===e true. controller.abort('str') made fetch reject with the bare string 'str' (typeof string).
