Expose user-agent and frontend-version on error report.

This commit is contained in:
Andrey Antukh 2021-02-03 22:19:47 +01:00 committed by Hirunatan
parent c14dbc19f8
commit b71d05935a
2 changed files with 28 additions and 2 deletions

View file

@ -39,6 +39,11 @@
:hint (ex-message error)
:data edata}
(let [headers (:headers request)]
{:user-agent (get headers "user-agent")
:frontend-version (get headers "x-frontend-version" "unknown")})
(when (and (map? edata) (:data edata))
{:explain (explain-error edata)}))))