Handle request error
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
448581058c
commit
bcbaeb2cd9
|
@ -424,6 +424,11 @@
|
|||
(log/error "Error on mark-trusted-peer: " error)
|
||||
(mailserver/check-connection cofx)))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:mailserver.callback/request-error
|
||||
(fn [cofx [_ error]]
|
||||
(mailserver/handle-request-error cofx error)))
|
||||
|
||||
;; network module
|
||||
|
||||
(handlers/register-handler-fx
|
||||
|
@ -1692,4 +1697,4 @@
|
|||
(handlers/register-handler-fx
|
||||
:stickers/open-sticker-pack
|
||||
(fn [cofx [_ uri]]
|
||||
(stickers/open-sticker-pack cofx uri)))
|
||||
(stickers/open-sticker-pack cofx uri)))
|
||||
|
|
|
@ -288,7 +288,9 @@
|
|||
(fn [error request-id]
|
||||
(if-not error
|
||||
(log/info "mailserver: messages request success for topic " topics "from" from "to" to)
|
||||
(log/error "mailserver: messages request error for topic " topics ": " error))))))
|
||||
(do
|
||||
(log/error "mailserver: messages request error for topic " topics ": " error)
|
||||
(re-frame/dispatch [:mailserver.callback/request-error (i18n/label :t/mailserver-request-error-title)])))))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:mailserver/request-messages
|
||||
|
|
Loading…
Reference in New Issue