Skip to content

Commit 627ffb3

Browse files
committed
https-proxy-agent: throw an Error when no proxy info is given
1 parent ca44610 commit 627ffb3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

https-proxy-agent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module.exports = HttpsProxyAgent;
2525
function HttpsProxyAgent (opts) {
2626
if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts);
2727
if ('string' == typeof opts) opts = url.parse(opts);
28+
if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
2829
var proxy = clone(opts, {});
2930
Agent.call(this);
3031

0 commit comments

Comments
 (0)