From fb0718adacf969b0e43166758458a2996117b7d1 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Thu, 2 May 2024 21:40:08 +0100 Subject: [PATCH] core: forward agent errors without connections to UI (to show CRITICAL alerts) (#4120) --- src/Simplex/Chat.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index e13dbfcbff..a186649f72 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -3532,6 +3532,8 @@ processAgentMessage _ connId (DEL_RCVQ srv qId err_) = toView $ CRAgentRcvQueueDeleted (AgentConnId connId) srv (AgentQueueId qId) err_ processAgentMessage _ connId DEL_CONN = toView $ CRAgentConnDeleted (AgentConnId connId) +processAgentMessage _ "" (ERR e) = + toView $ CRChatError Nothing $ ChatErrorAgent e Nothing processAgentMessage corrId connId msg = do lockEntity <- critical (withStore (`getChatLockEntity` AgentConnId connId)) withEntityLock "processAgentMessage" lockEntity $ do