diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 2bc2c7bce57..c4dcb9ac5f6 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -896,9 +896,9 @@ E('ERR_INVALID_OPT_VALUE_ENCODING', 'The value "%s" is invalid for option "encoding"', TypeError); E('ERR_INVALID_PERFORMANCE_MARK', 'The "%s" performance mark has not been set', Error); - -// This should probably be a `TypeError`. -E('ERR_INVALID_PROTOCOL', 'Protocol "%s" not supported. Expected "%s"', Error); +E('ERR_INVALID_PROTOCOL', + 'Protocol "%s" not supported. Expected "%s"', + TypeError); E('ERR_INVALID_REPL_EVAL_CONFIG', 'Cannot specify both "breakEvalOnSigint" and "eval" for REPL', TypeError); E('ERR_INVALID_SYNC_FORK_INPUT', diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index 986f75d3076..5df547594b8 100644 --- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -38,7 +38,7 @@ invalidUrls.forEach((invalid) => { () => { http.request(url.parse(invalid)); }, { code: 'ERR_INVALID_PROTOCOL', - type: Error + type: TypeError } ); });