← Back to release summary

Error.isError

Category
JavaScript
Type
Chromium catches up
Status
In developer trial (Behind a flag) (Chrome 134)
Intent stage
None

Summary

Adds the Error.isError(obj) static method. It returns true for JS native errors and DOMExceptions, and false otherwise.

Motivation

See https://github.com/tc39/proposal-is-error/blob/main/README.md

Standards & signals

View on chromestatus.com