Skip to content

Commit

Permalink
Added the ability to reupload logs when receiving error 408
Browse files Browse the repository at this point in the history
  • Loading branch information
Plenyx committed Apr 9, 2024
1 parent 9c6f25f commit 2a26510
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Forms/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,8 @@ internal async Task HttpUploadLogAsync(string file, Dictionary<string, string> p
using var responseMessage = await HttpClientController.PostAsync(CreateDPSReportLink(), content);
if (!responseMessage.IsSuccessStatusCode)
{
if ((int)responseMessage.StatusCode == 429)
var statusCode = (int)responseMessage.StatusCode;
if ((statusCode == 408) || (statusCode == 429))
{
AddToText($">:> Unable to upload file {Path.GetFileName(file)}, dps.report responded with Too-Many-Logs-Per-Minute error (429). Log will be reuploaded in 15 minutes.");
LogReuploader.FailedLogs.Add(file);
Expand Down

0 comments on commit 2a26510

Please sign in to comment.