diff --git a/lib/_http_client.js b/lib/_http_client.js index 19e9753c72467f..d62986da955955 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -178,8 +178,10 @@ function ClientRequest(input, options, cb) { if (options.path) { const path = String(options.path); - if (RegExpPrototypeExec(INVALID_PATH_REGEX, path) !== null) + if (RegExpPrototypeExec(INVALID_PATH_REGEX, path) !== null) { + debug('Path contains unescaped characters: "%s"', path); throw new ERR_UNESCAPED_CHARACTERS('Request path'); + } } if (protocol !== expectedProtocol) {