From b117c5164dc53f7fb5ed315e8d4856553f0e4e1c Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 27 Jun 2022 14:17:38 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs index 23380fe16..988f35a72 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs @@ -174,12 +174,12 @@ public sealed class ArchiWebHandler : IDisposable { response = await UrlGetToJsonObjectWithSession(request, requestOptions: WebBrowser.ERequestOptions.ReturnServerErrors, rateLimitingDelay: rateLimitingDelay).ConfigureAwait(false); - if (response?.Content == null) { + if (response == null) { throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.ErrorObjectIsNull, nameof(response))); } if (response.StatusCode.IsServerErrorCode()) { - if (string.IsNullOrEmpty(response.Content.Error)) { + if (string.IsNullOrEmpty(response.Content?.Error)) { // This is a generic server error without a reason, try again response = null; @@ -427,12 +427,12 @@ public sealed class ArchiWebHandler : IDisposable { for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) { response = await UrlPostToJsonObjectWithSession(request, data: data, referer: referer, requestOptions: WebBrowser.ERequestOptions.ReturnServerErrors).ConfigureAwait(false); - if (response?.Content == null) { + if (response == null) { return (false, mobileTradeOfferIDs); } if (response.StatusCode.IsServerErrorCode()) { - if (string.IsNullOrEmpty(response.Content.ErrorText)) { + if (string.IsNullOrEmpty(response.Content?.ErrorText)) { // This is a generic server error without a reason, try again response = null; @@ -1256,12 +1256,12 @@ public sealed class ArchiWebHandler : IDisposable { for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) { response = await UrlPostToJsonObjectWithSession(request, data: data, referer: referer, requestOptions: WebBrowser.ERequestOptions.ReturnServerErrors).ConfigureAwait(false); - if (response?.Content == null) { + if (response == null) { return (false, false); } if (response.StatusCode.IsServerErrorCode()) { - if (string.IsNullOrEmpty(response.Content.ErrorText)) { + if (string.IsNullOrEmpty(response.Content?.ErrorText)) { // This is a generic server error without a reason, try again response = null;