Skip to content

Commit

Permalink
Update RetryHandler.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
laolarou726 committed Apr 10, 2024
1 parent 8c4d817 commit e303af3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ProjBobcat/ProjBobcat/Handler/RetryHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading;
Expand Down Expand Up @@ -42,7 +43,7 @@ protected override async Task<HttpResponseMessage> SendAsync(
return response;
}

return response!;
return response ?? new HttpResponseMessage(HttpStatusCode.BadRequest);
}

static bool IsNetworkError(Exception ex)
Expand Down

0 comments on commit e303af3

Please sign in to comment.