diff --git a/src/status_im/utils/error_handler.cljs b/src/status_im/utils/error_handler.cljs index a717a2d92f..a80dd10d60 100644 --- a/src/status_im/utils/error_handler.cljs +++ b/src/status_im/utils/error_handler.cljs @@ -60,4 +60,4 @@ {:title "Error" :content (.-message e) :confirm-button-text (i18n/label :t/send-logs) - :on-accept #(re-frame/dispatch [:logging.ui/send-logs-pressed :email])}))))))) + :on-accept #(re-frame/dispatch [:logging/send-logs-on-error (.-message e)])}))))))) diff --git a/src/status_im/utils/logging/core.cljs b/src/status_im/utils/logging/core.cljs index dba53889cc..69ea87efcd 100644 --- a/src/status_im/utils/logging/core.cljs +++ b/src/status_im/utils/logging/core.cljs @@ -153,6 +153,13 @@ ::share-logs-file)]}) (send-email-event cofx nil))) +(fx/defn send-logs-on-error + {:events [:logging/send-logs-on-error]} + [{:keys [db]} error-message] + (fx/merge + {:db (assoc-in db [:bug-report/details :description] error-message)} + (send-logs :email))) + (fx/defn show-client-error {:events [:show-client-error]} [_]