Skip to content

Commit

Permalink
refactor: remaining response destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
lasselinkola-yle committed Oct 12, 2023
1 parent 3e9033f commit 8c3b8a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clojure_elastic_apm/ring.clj
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
traceparent (get-in headers ["traceparent"])]
(with-apm-transaction [tx {:name tx-name :type type-request :traceparent traceparent}]
(let [req (assoc request :clojure-elastic-apm/transaction tx)]
(handler req (fn [response]
(when (:status response)
(.setResult tx (str "HTTP " (:status response))))
(handler req (fn [{:keys [status] :as response}]
(when status
(.setResult tx (str "HTTP " status)))
(respond response)) raise)))))))
([handler patterns]
(fn
Expand Down

0 comments on commit 8c3b8a6

Please sign in to comment.