Add url to Request-Error Output
This commit is contained in:
parent
b5be4e0dd8
commit
95da900213
@ -44,10 +44,10 @@ internal class HttpDownloadClient : DownloadClient
|
|||||||
switch (e)
|
switch (e)
|
||||||
{
|
{
|
||||||
case TaskCanceledException:
|
case TaskCanceledException:
|
||||||
Log($"Request timed out.\n\r{e}");
|
Log($"Request timed out {url}.\n\r{e}");
|
||||||
return new RequestResult(HttpStatusCode.RequestTimeout, null, Stream.Null);
|
return new RequestResult(HttpStatusCode.RequestTimeout, null, Stream.Null);
|
||||||
case HttpRequestException:
|
case HttpRequestException:
|
||||||
Log($"Request failed\n\r{e}");
|
Log($"Request failed {url}\n\r{e}");
|
||||||
return new RequestResult(HttpStatusCode.BadRequest, null, Stream.Null);
|
return new RequestResult(HttpStatusCode.BadRequest, null, Stream.Null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ internal class HttpDownloadClient : DownloadClient
|
|||||||
|
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
Log($"Request-Error {response.StatusCode}: {response.ReasonPhrase}");
|
Log($"Request-Error {response.StatusCode}: {url}");
|
||||||
return new RequestResult(response.StatusCode, null, Stream.Null);
|
return new RequestResult(response.StatusCode, null, Stream.Null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user