core: update broker error type (#1474)

* core: update broker error type

* fix test

* fix test
This commit is contained in:
Evgeny Poberezkin
2022-12-02 15:01:26 +00:00
committed by GitHub
parent a4dd520248
commit bc28568c63
6 changed files with 13 additions and 6 deletions
+4 -1
View File
@@ -650,9 +650,12 @@ viewSMPTestResult = \case
Just SMPTestFailure {testStep, testError} ->
result
<> ["Server requires authorization to create queues, check password" | testStep == TSCreateQueue && testError == SMP SMP.AUTH]
<> ["Possibly, certificate fingerprint in server address is incorrect" | testStep == TSConnect && testError == BROKER NETWORK]
<> ["Possibly, certificate fingerprint in server address is incorrect" | testStep == TSConnect && brokerErr]
where
result = ["SMP server test failed at " <> plain (drop 2 $ show testStep) <> ", error: " <> plain (strEncode testError)]
brokerErr = case testError of
BROKER _ NETWORK -> True
_ -> False
_ -> ["SMP server test passed"]
viewChatItemTTL :: Maybe Int64 -> [StyledString]