JavaScript Error.isError() Is Coming to V8: What the TC39 Proposal Means for Cross-Realm Error Checking
This article was written with the assistance of AI, under human supervision and review.
The Error.isError() static method checks whether a value is an Error instance using a branded check mechanism that works across realms, addressing silent failures in instanceof Error when errors cross iframe, worker, or Node.js vm module boundaries. The TC39 proposal reached Stage 4 and ships in Chrome 134+, Firefox 138+, and Node.js 23.0+.
Problem diagram showing instanceof Error failing with cross-realm error
Developers face two distinct failure modes with instanceof Error . An error thrown in an iframe and caught in the parent window returns false because each realm has its own Error constructor. The opposite problem hits when a plain object with Error.prototype in its chain passes the instanceof test despite lacking the internal error state.…