Unverified Commit 2b5f2bc6 authored by Ruben Bridgewater's avatar Ruben Bridgewater
Browse files

util: improve internal `isError()` validation

The current internal isError function checked the toString value
instead of using the more precise `util.types.isNativeError()` check.
The `instanceof` check is not removed due to possible errors that
are not native but still an instance of Error.

PR-URL: https://github.com/nodejs/node/pull/24746


Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
parent 1fe824bc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment