diff --git a/ArchiSteamFarm/WebBrowser.cs b/ArchiSteamFarm/WebBrowser.cs index 6e613e29fc53e..86c292eeb13c0 100644 --- a/ArchiSteamFarm/WebBrowser.cs +++ b/ArchiSteamFarm/WebBrowser.cs @@ -214,7 +214,16 @@ private static async Task UrlRequest(string request, HttpMe } } - if (responseMessage == null || !responseMessage.IsSuccessStatusCode) { + if (responseMessage == null) { + return null; + } + + if (!responseMessage.IsSuccessStatusCode) { + if (Program.GlobalConfig.Debug) { + Logging.LogGenericError("Request: " + request + "failed!"); + Logging.LogGenericError("Status code: " + responseMessage.StatusCode); + Logging.LogGenericError("Content: " + await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false)); + } return null; }