[fix 6051] log error during connexion and pass cofx
Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
c289b0bfb2
commit
f6a50b2799
|
@ -46,7 +46,8 @@
|
||||||
(receive-message now-in-s chat-id message))
|
(receive-message now-in-s chat-id message))
|
||||||
(js-array->seq js-messages))]
|
(js-array->seq js-messages))]
|
||||||
(apply fx/merge cofx receive-message-fxs))
|
(apply fx/merge cofx receive-message-fxs))
|
||||||
(log/error "Something went wrong" js-error js-messages)))
|
(do (log/error "Something went wrong" js-error js-messages)
|
||||||
|
cofx)))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:protocol/receive-whisper-message
|
:protocol/receive-whisper-message
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
|
|
||||||
(deftest receive-whisper-messages-test
|
(deftest receive-whisper-messages-test
|
||||||
(testing "an error is reported"
|
(testing "an error is reported"
|
||||||
(is (nil? (handlers/receive-whisper-messages {:db {}} "error" #js [] nil))))
|
(is (nil? (:chat-received-message/add-fx (handlers/receive-whisper-messages {:db {}} "error" #js [] nil)))))
|
||||||
(testing "messages is undefined"
|
(testing "messages is undefined"
|
||||||
(is (nil? (handlers/receive-whisper-messages {:db {}} nil js/undefined nil))))
|
(is (nil? (:chat-received-message/add-fx (handlers/receive-whisper-messages {:db {}} nil js/undefined nil)))))
|
||||||
(testing "happy path"
|
(testing "happy path"
|
||||||
(let [actual (handlers/receive-whisper-messages {:db {}} nil messages sig)]
|
(let [actual (handlers/receive-whisper-messages {:db {}} nil messages sig)]
|
||||||
(testing "it add an fx for the message"
|
(testing "it add an fx for the message"
|
||||||
|
|
Loading…
Reference in New Issue