Skip to content

Commit

Permalink
Merge pull request request#840 from FND/patch-1
Browse files Browse the repository at this point in the history
improve error reporting for invalid protocols
  • Loading branch information
mikeal committed Mar 12, 2014
2 parents db691b0 + 79d20e0 commit e39b51f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Request.prototype.init = function (options) {
;
self.httpModule = httpModules[protocol] || defaultModules[protocol]

if (!self.httpModule) return this.emit('error', new Error("Invalid protocol"))
if (!self.httpModule) return this.emit('error', new Error("Invalid protocol: " + protocol))

if (options.ca) self.ca = options.ca

Expand Down

0 comments on commit e39b51f

Please sign in to comment.