Skip to content

Commit

Permalink
🔨 handle fake redirect from steam.supply
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed May 2, 2024
1 parent e7a88e7 commit cc76af7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/classes/InventoryApis/InventoryApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default class InventoryApi {
return;
}

if (result?.fake_redirect === 0) {
// fake redirect caused by steam erros on the proxy's side
return callback(new Error('Received fake redirect 0'));
}

if (result && result.success && result.total_inventory_count === 0) {
// Empty inventory
callback(null, [], [], 0);
Expand Down Expand Up @@ -177,4 +182,5 @@ interface GetUserInventoryContentsResult {
more_items?: number;
total_inventory_count?: number;
success?: number;
fake_redirect?: 1 | 0;
}

0 comments on commit cc76af7

Please sign in to comment.