Skip to content

Commit

Permalink
Merge pull request WalletWasabi#12307 from Szpoti/torExcInPeriodicRunner
Browse files Browse the repository at this point in the history
Add `HttpRequestException` handling in `PeriodicRunner`
  • Loading branch information
molnard authored Jan 24, 2024
2 parents 66b20d2 + 6d55be9 commit 56c4c59
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion WalletWasabi/Bases/PeriodicRunner.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Hosting;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Extensions;
Expand Down Expand Up @@ -104,7 +105,14 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
var info = ExceptionTracker.Process(ex);
if (info.IsFirst)
{
Logger.LogError(info.Exception);
if (info.Exception is HttpRequestException)
{
Logger.LogWarning(ex);
}
else
{
Logger.LogError(info.Exception);
}
}
}

Expand Down

0 comments on commit 56c4c59

Please sign in to comment.