mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
lib: port errors to new system
This is a first batch of updates that touches non-underscored modules in lib. PR-URL: https://github.com/nodejs/node/pull/19034 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
023f49c5a9
commit
1e8d110e64
31 changed files with 377 additions and 418 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const errors = require('internal/errors');
|
||||
const { ERR_TLS_CERT_ALTNAME_INVALID } = require('internal/errors').codes;
|
||||
const internalUtil = require('internal/util');
|
||||
const internalTLS = require('internal/tls');
|
||||
internalUtil.assertCrypto();
|
||||
|
@ -224,7 +224,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) {
|
|||
}
|
||||
|
||||
if (!valid) {
|
||||
const err = new errors.Error('ERR_TLS_CERT_ALTNAME_INVALID', reason);
|
||||
const err = new ERR_TLS_CERT_ALTNAME_INVALID(reason);
|
||||
err.reason = reason;
|
||||
err.host = host;
|
||||
err.cert = cert;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue