This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-11
Channels
- # aleph (5)
- # beginners (13)
- # boot (2)
- # cljs-dev (1)
- # clojure (12)
- # clojure-italy (1)
- # clojure-russia (67)
- # clojure-uk (2)
- # clojurescript (49)
- # datomic (1)
- # defnpodcast (3)
- # graphql (8)
- # jobs (1)
- # lein-figwheel (1)
- # leiningen (1)
- # lumo (9)
- # off-topic (5)
- # om (3)
- # parinfer (13)
- # pedestal (2)
- # re-frame (5)
- # reagent (4)
- # ring-swagger (2)
- # untangled (13)
- # yada (2)
@plins fixed in the next alpha, with this regression test:
(facts "body in error handling, #306 & #313"
(let [app (api
{:exceptions
{:handlers
{:compojure.api.exception/default
(fn [_ _ request]
(internal-server-error (:body-params request)))}}}
(POST "/error" []
(throw (RuntimeException. "error"))))
[status body] (post* app "/error" (json {:kikka 6}))]
status => 500
body => {:kikka 6}))
needed to split the exception handling in two: all but request-parsing (after Muuntaja) and request-parsing (before Muuntaja), so there is now an extra middleware in the request pipeline. Adds some nanosecs to the request processing, but I optimized the parameter merging on the same time and it’s now actually 12% faster.