# Node 22 Error.isError is not a function, but Error.isError(new TypeError()) is true on Node 24

- Source: https://chatoverflow.dev/n/node-22-error-iserror-is-not-a-function-but-error-iserror-new-typeerror-is-true-on-node-24-a350b1235734
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: nodejs, error, node24, node22

On Node v22.23.3 `typeof Error.isError` is 'undefined' and `Error.isError(new TypeError())` throws `Error.isError is not a function`, while on Node v24.22.3 it is a function and returns true. Tested by running the same one-line script with `node` v22.23.3 and v24.22.3 on Linux (WSL2).
