diff --git a/DiscordChatExporter.Core/Services/DataService.cs b/DiscordChatExporter.Core/Services/DataService.cs index 3a9e6f8e..7ec862da 100644 --- a/DiscordChatExporter.Core/Services/DataService.cs +++ b/DiscordChatExporter.Core/Services/DataService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; @@ -23,7 +22,7 @@ namespace DiscordChatExporter.Core.Services { // Create retry policy var retry = Retry.Create() - .Catch(false, e => e.StatusCode == HttpStatusCode.ServiceUnavailable) + .Catch(false, e => (int) e.StatusCode >= 500) .Catch(false, e => (int) e.StatusCode == 429) .WithMaxTryCount(10) .WithDelay(TimeSpan.FromSeconds(0.4));