From 54e76cf55932d87788b6b901583d059c5832bd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Thu, 4 Apr 2024 19:08:23 +0200 Subject: [PATCH] Handle EResult.Fail in inventory request --- ArchiSteamFarm/Steam/Integration/ArchiHandler.cs | 1 + ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs index 7d2a7bb838a1d..8fb5aeb6d1d2c 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiHandler.cs @@ -239,6 +239,7 @@ public async IAsyncEnumerable 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)); diff --git a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs index 1d45c8f438ab1..d062c8c7d81fb 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs @@ -308,6 +308,7 @@ public async IAsyncEnumerable 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);