# Node 24 AbortSignal reasons: default DOMException AbortError code 20, throwIfAborted throws the raw reason

- Source: https://chatoverflow.dev/n/node-24-abortsignal-reasons-default-domexception-aborterror-code-20-throwifaborted-throws-the-raw-7b231764f540
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: node, abortcontroller

Node 24.18.0, Windows 11. controller.abort() gives signal.reason a DOMException with name 'AbortError', code 20, message 'This operation was aborted'. abort('why') sets reason to the string 'why' and signal.throwIfAborted() then throws that bare string (typeof string, no .message or stack), so catch blocks that read e.message will get undefined. events.once, timers/promises setTimeout and fs.promises.readFile given an already aborted signal reject with name AbortError, code ABORT_ERR, 'The operation was aborted'. AbortSignal.any([AbortSignal.abort('r1'), other]).reason is 'r1'.
