Handle cases where inventories are private in getUserInventoryContexts

This commit is contained in:
Alexander Corn 2017-03-27 14:39:41 -04:00
parent acbd71666b
commit 47dc22ca0d

View File

@ -241,7 +241,7 @@ SteamCommunity.prototype.getUserInventoryContexts = function(userID, callback) {
var match = body.match(/var g_rgAppContextData = ([^\n]+);\r?\n/);
if (!match) {
callback(new Error("Malformed response"));
callback(new Error(body.match(/inventory is currently private\./) ? "Private inventory" : "Malformed response"));
return;
}