From 9497d368900153110578b80af048ac6820eadd70 Mon Sep 17 00:00:00 2001 From: West <30056636+West14@users.noreply.github.com> Date: Sun, 4 Aug 2024 21:43:30 +0300 Subject: [PATCH] feat(rss): catch exceptions in DoFetch --- modules/RichSiteSummary/Service/RssFetch.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/RichSiteSummary/Service/RssFetch.cs b/modules/RichSiteSummary/Service/RssFetch.cs index 64ddaeb..a254082 100644 --- a/modules/RichSiteSummary/Service/RssFetch.cs +++ b/modules/RichSiteSummary/Service/RssFetch.cs @@ -114,6 +114,9 @@ public class RssFetch : IHostedService, IDisposable await dbContext.SaveChangesAsync(); } + catch (Exception ex) { + _logger.LogError("{Message}", ex.Message); + } finally { _timer.Change(TimerPeriod, TimerPeriod); @@ -261,4 +264,4 @@ public class RssFetch : IHostedService, IDisposable } #endregion -} \ No newline at end of file +}