This commit is contained in:
Evgeny Poberezkin
2025-09-02 16:45:54 +01:00
parent b8768ed23e
commit afc6256eff
4 changed files with 5 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ crDirectoryEvent :: Either ChatError ChatEvent -> Maybe DirectoryEvent
crDirectoryEvent = \case
Right evt -> crDirectoryEvent_ evt
Left e -> case e of
ChatErrorAgent {agentError = BROKER _ NETWORK} -> Nothing
ChatErrorAgent {agentError = BROKER _ (NETWORK _)} -> Nothing
ChatErrorAgent {agentError = BROKER _ TIMEOUT} -> Nothing
_ -> Just $ DELogChatResponse $ "chat error: " <> tshow e

View File

@@ -4209,7 +4209,7 @@ subscribeUserConnections vr onlyNeeded agentBatchSubscribe user = do
netStatus = maybe NSConnected $ NSError . errorNetworkStatus
errorNetworkStatus :: ChatError -> String
errorNetworkStatus = \case
ChatErrorAgent (BROKER _ NETWORK) _ -> "network"
ChatErrorAgent (BROKER _ (NETWORK _)) _ -> "network"
ChatErrorAgent (SMP _ SMP.AUTH) _ -> "contact deleted"
e -> show e
-- TODO possibly below could be replaced with less noisy events for API

View File

@@ -1601,7 +1601,7 @@ processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage =
e -> SndErrOther $ tshow e
where
brokerError srvErr = \case
NETWORK -> SndErrExpired
NETWORK _ -> SndErrExpired
TIMEOUT -> SndErrExpired
HOST -> srvErr SrvErrHost
SMP.TRANSPORT TEVersion -> srvErr SrvErrVersion

View File

@@ -1509,7 +1509,7 @@ viewServerTestResult (AProtoServerWithAuth p _) = \case
where
result = [pName <> " server test failed at " <> plain (drop 2 $ show testStep) <> ", error: " <> sShow testError]
brokerErr = case testError of
BROKER _ NETWORK -> True
BROKER _ (NETWORK _) -> True
_ -> False
_ -> [pName <> " server test passed"]
where
@@ -2536,7 +2536,7 @@ viewChatError isCmd logLevel testView = \case
reasonStr = case reason of
BRSpam -> "spam"
BRContent -> "content violates conditions of use"
BROKER _ NETWORK | not isCmd -> []
BROKER _ (NETWORK _) | not isCmd -> []
BROKER _ TIMEOUT | not isCmd -> []
AGENT A_DUPLICATE -> [withConnEntity <> "error: AGENT A_DUPLICATE" | logLevel == CLLDebug || isCmd]
AGENT (A_PROHIBITED e) -> [withConnEntity <> "error: AGENT A_PROHIBITED, " <> plain e | logLevel <= CLLWarning || isCmd]