lib: fix error name
This makes sure Node.js errors have a "regular" error name while keeping the error code in the stack trace. Please have a look at the individual commits for a more detailed description.
Fixes: #26669 (closed) Fixes: https://github.com/nodejs/node/issues/20253
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines