diff --git a/Mimir.Worker/Handler/BaseDiffHandler.cs b/Mimir.Worker/Handler/BaseDiffHandler.cs index 8d0fb063..778c0c47 100644 --- a/Mimir.Worker/Handler/BaseDiffHandler.cs +++ b/Mimir.Worker/Handler/BaseDiffHandler.cs @@ -32,8 +32,15 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) while (!stoppingToken.IsCancellationRequested) { - var diffContext = await ProduceByAccount(stoppingToken); - await ConsumeAsync(diffContext, stoppingToken); + try + { + var diffContext = await ProduceByAccount(stoppingToken); + await ConsumeAsync(diffContext, stoppingToken); + } + catch (Exception e) + { + Logger.Error(e, "Unexpected error occurred."); + } } }