Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
src: add .code and SSL specific error properties #25093
SSL errors have a long structured message, but lacked the standard .code
This is WIP, TBD is move the property strings to the isolate, and add docs and more tests.
I've seen a reasonable amount of code that is doing string matching on the error string, looking for the reason part, I think exposing the properties makes more sense. Also, I think the intention is for all Errors to expose
I've gone some way to exposing these properties for node_crypto.cc, too, but I'm not done. Once this PR lands I'll keep working on it.
@sam-github LGTM apart from I'm seeing the same test failures locally as reported by the CI run.
$ out/Release/node --tls-v1.1 /Users/danielbevenius/work/nodejs/node/test/parallel/test-tls-cli-min-version-1.1.js assert.js:86 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected + undefined - 'ERR_SSL_VERSION_TOO_LOW' at common.mustCall (/Users/danielbevenius/work/nodejs/node/test/parallel/test-tls-min-max-version.js:31:14) at /Users/danielbevenius/work/nodejs/node/test/common/index.js:373:15 at /Users/danielbevenius/work/nodejs/node/test/common/index.js:373:15 at maybeCallback (/Users/danielbevenius/work/nodejs/node/test/fixtures/tls-connect.js:97:7) at Server.<anonymous> (/Users/danielbevenius/work/nodejs/node/test/fixtures/tls-connect.js:84:7) at Server.emit (events.js:188:13) at TLSSocket.onSocketTLSError (_tls_wrap.js:728:29) at TLSSocket.emit (events.js:188:13) at TLSSocket._tlsError (_tls_wrap.js:608:8) at TLSSocket.emit (events.js:188:13)