Skip to content

Commit

Permalink
Handle EResult.Fail in inventory request
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Apr 4, 2024
1 parent 477cc8b commit 54e76cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ArchiSteamFarm/Steam/Integration/ArchiHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public async IAsyncEnumerable<Asset> GetMyInventoryAsync(uint appID = Asset.Stea
ArchiLogger.LogGenericDebug(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, serviceMethodResponse.Result));

continue;
case EResult.Fail:
case EResult.NoMatch:
// Expected failures that we're not going to retry
throw new TimeoutException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, serviceMethodResponse.Result));
Expand Down
1 change: 1 addition & 0 deletions ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public async IAsyncEnumerable<Asset> GetInventoryAsync(ulong steamID = 0, uint a
case EResult.Timeout:
// Expected failures that we should be able to retry
continue;
case EResult.Fail:
case EResult.NoMatch:
// Expected failures that we're not going to retry
throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, response.Content.ErrorText), null, response.StatusCode);
Expand Down

0 comments on commit 54e76cf

Please sign in to comment.