diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index c04121ea476a82..b5f3bf6f64c40a 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -888,7 +888,8 @@ exports.connect = function(/* [port, host], options, cb */) { if (!options.keepAlive) options.singleUse = true; - assert(typeof options.checkServerIdentity === 'function'); + assert(typeof options.checkServerIdentity === 'function', + 'options.checkServerIdentity is not a function'); assert(typeof options.minDHSize === 'number', 'options.minDHSize is not a number: ' + options.minDHSize); assert(options.minDHSize > 0,