HttpDownloadClient add a Debug statement if the request fails with status code and content

This commit is contained in:
2025-06-16 00:10:59 +02:00
parent 58ed976737
commit c370e656f1

View File

@ -40,6 +40,7 @@ internal class HttpDownloadClient : DownloadClient
if (!response.IsSuccessStatusCode) if (!response.IsSuccessStatusCode)
{ {
Log.Debug($"Request returned status code {response.StatusCode} {response.ReasonPhrase}:\n{response.Content.ReadAsStringAsync()}");
return new (response.StatusCode, null, Stream.Null); return new (response.StatusCode, null, Stream.Null);
} }