mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 13:13:28 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9ec1ccfb5 | ||
|
|
0c7c030f78 | ||
|
|
e5f1f14aad |
@@ -49,7 +49,7 @@ SteamCommunity.prototype.getInventoryHistory = function(options, callback) {
|
||||
|
||||
var $ = Cheerio.load(body);
|
||||
if (!$('.inventory_history_pagingrow').html()) {
|
||||
callback("Malformed page: no paging row found");
|
||||
callback(new Error("Malformed page: no paging row found"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -377,10 +377,28 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
|
||||
return;
|
||||
}
|
||||
|
||||
if (err.message == "HTTP error 500" && body && body.error) {
|
||||
err = new Error(body.error);
|
||||
|
||||
var match = body.error.match(/^(.+) \((\d+)\)$/);
|
||||
if (match) {
|
||||
err.message = match[1];
|
||||
err.eresult = match[2];
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
if (body && body.success && body.total_inventory_count === 0) {
|
||||
// Empty inventory
|
||||
callback(null, [], [], 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!body || !body.success || !body.assets || !body.descriptions) {
|
||||
if (body) {
|
||||
// Dunno if the error/Error property even exists on this new endpoint
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "steamcommunity",
|
||||
"version": "3.30.3",
|
||||
"version": "3.30.4",
|
||||
"description": "Provides an interface for logging into and interacting with the Steam Community website",
|
||||
"keywords": ["steam", "steam community"],
|
||||
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",
|
||||
|
||||
Reference in New Issue
Block a user