🐛 Show proper version on error report api

This commit is contained in:
Andrey Antukh 2026-07-23 11:02:27 +02:00
parent 66b978c01e
commit e4d88b3ab4

View File

@ -169,12 +169,13 @@
[cfg {:keys [id]}]
(if-let [report (db/get-by-id cfg :server-error-report id {::db/check-deleted false})]
(let [content (db/decode-transit-pgobject (:content report))]
(-> report
(dissoc :content)
(merge content)
(update :source source->name)
(assoc :kind (or (:kind content) (:origin content)))
(d/without-nils)))
(-> report
(dissoc :content)
(merge content)
(update :source source->name)
(assoc :kind (or (:kind content) (:origin content)))
(assoc :version (:version content))
(d/without-nils)))
(ex/raise :type :not-found
:code :report-not-found
:hint (str "error report " id " not found"))))