mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #847 from wabbajack-tools/dont-retry-http-response-errors
Don't retry http response errors
This commit is contained in:
commit
b9592175b3
@ -76,12 +76,15 @@ namespace Wabbajack.Common.Http
|
||||
var response = await ClientFactory.Client.SendAsync(msg, responseHeadersRead);
|
||||
if (response.IsSuccessStatusCode) return response;
|
||||
|
||||
if (errorsAsExceptions)
|
||||
throw new HttpRequestException($"Http Exception {response.StatusCode} - {response.ReasonPhrase} - {msg.RequestUri}");;
|
||||
if (errorsAsExceptions)
|
||||
throw new HttpRequestException(
|
||||
$"Http Exception {response.StatusCode} - {response.ReasonPhrase} - {msg.RequestUri}");
|
||||
;
|
||||
return response;
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex is HttpRequestException) throw;
|
||||
if (retries > Consts.MaxHTTPRetries) throw;
|
||||
|
||||
retries++;
|
||||
|
Loading…
Reference in New Issue
Block a user