Make the error in getWebApiKey an Error object

This commit is contained in:
Alexander Corn 2015-10-06 18:53:25 -04:00
parent c700b7663b
commit f37bff4a57

View File

@ -158,7 +158,7 @@ SteamCommunity.prototype.getWebApiKey = function(domain, callback) {
}
if(body.match(/<h2>Access Denied<\/h2>/)) {
return callback("Access Denied");
return callback(new Error("Access Denied"));
}
var match = body.match(/<p>Key: ([0-9A-F]+)<\/p>/);