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)
|
(log/error "Error on mark-trusted-peer: " error)
|
||||||
(mailserver/check-connection cofx)))
|
(mailserver/check-connection cofx)))
|
||||||
|
|
||||||
|
(handlers/register-handler-fx
|
||||||
|
:mailserver.callback/request-error
|
||||||
|
(fn [cofx [_ error]]
|
||||||
|
(mailserver/handle-request-error cofx error)))
|
||||||
|
|
||||||
;; network module
|
;; network module
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
|
|
|
@ -288,7 +288,9 @@
|
||||||
(fn [error request-id]
|
(fn [error request-id]
|
||||||
(if-not error
|
(if-not error
|
||||||
(log/info "mailserver: messages request success for topic " topics "from" from "to" to)
|
(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
|
(re-frame/reg-fx
|
||||||
:mailserver/request-messages
|
:mailserver/request-messages
|
||||||
|
|
Loading…
Reference in New Issue