diff --git a/lib/_tls_common.js b/lib/_tls_common.js index 2a4ad9b24e8a8a..53d082bfa33178 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -169,7 +169,7 @@ exports.createSecureContext = function createSecureContext(options) { if (cipherSuites === '' && cipherList === '') { // Specifying empty cipher suites for both TLS1.2 and TLS1.3 is invalid, its // not possible to handshake with no suites. - throw ERR_INVALID_OPT_VALUE('ciphers', ciphers); + throw new ERR_INVALID_OPT_VALUE('ciphers', ciphers); } c.context.setCipherSuites(cipherSuites);