From a88449ddaba56447f97c7824d9268a6a5c5e6d7c Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:30:39 -0500 Subject: [PATCH] Added try/catch to DLive --- KfChatDotNetBot/Services/DLive.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Services/DLive.cs b/KfChatDotNetBot/Services/DLive.cs index 196d8b9..65214f7 100644 --- a/KfChatDotNetBot/Services/DLive.cs +++ b/KfChatDotNetBot/Services/DLive.cs @@ -45,7 +45,17 @@ public class DLive(ChatBot kfChatBot) : IDisposable continue; } - var status = await IsLive(username, ct); + DLiveIsLiveModel status; + try + { + status = await IsLive(username, ct); + } + catch (Exception e) + { + _logger.Error($"Caught an exception while retrieving live status for {username}"); + _logger.Error(e); + continue; + } if (!status.IsLive) { currentlyLive.Remove(username);