Fork me on GitHub

@plins fixed in the next alpha, with this regression test:

(facts "body in error handling, #306 & #313"
  (let [app (api
                 (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.