[#13038] Add error message to email template on crash

This commit is contained in:
Roman Volosovskyi 2022-01-24 16:55:47 +02:00
parent 7bbb882ffa
commit 93d4dc8cb5
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 8 additions and 1 deletions

View File

@ -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)])})))))))

View File

@ -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]}
[_]