diff --git a/Wabbajack.CLI/Verbs/ValidateLists.cs b/Wabbajack.CLI/Verbs/ValidateLists.cs index 55a5eeec..321a8aa0 100644 --- a/Wabbajack.CLI/Verbs/ValidateLists.cs +++ b/Wabbajack.CLI/Verbs/ValidateLists.cs @@ -137,8 +137,9 @@ public class ValidateLists : IVerb modListData = await StandardInstaller.Load(_dtos, _dispatcher, modList, token); } - catch (JsonException ex) + catch (Exception ex) { + _logger.LogError(ex, "Forcing down {Modlist} due to error while loading: ", modList.NamespacedName); validatedList.Status = ListStatus.ForcedDown; return validatedList; } diff --git a/Wabbajack.Downloaders.Http/HttpDownloader.cs b/Wabbajack.Downloaders.Http/HttpDownloader.cs index b593c067..7133dbdd 100644 --- a/Wabbajack.Downloaders.Http/HttpDownloader.cs +++ b/Wabbajack.Downloaders.Http/HttpDownloader.cs @@ -176,13 +176,16 @@ public class HttpDownloader : ADownloader, IUrlDownloa public override async Task LoadChunk(long offset, int size) { - var msg = HttpDownloader.MakeMessage(_state); - msg.Headers.Range = new RangeHeaderValue(offset, offset + size); - using var response = await _downloader._client.SendAsync(msg); - if (!response.IsSuccessStatusCode) - throw new HttpException(response); + return await CircuitBreaker.WithAutoRetryAllAsync(_downloader._logger, async () => + { + var msg = HttpDownloader.MakeMessage(_state); + msg.Headers.Range = new RangeHeaderValue(offset, offset + size); + using var response = await _downloader._client.SendAsync(msg); + if (!response.IsSuccessStatusCode) + throw new HttpException(response); - return await response.Content.ReadAsByteArrayAsync(); + return await response.Content.ReadAsByteArrayAsync(); + }); } } } \ No newline at end of file