Skip to content
Browse files

Fix 500 error responses

  • Loading branch information...
swlkr committed Mar 17, 2019
1 parent ac13ba5 commit cfb3ed5a23628ae31d4d3e346b67bcdc12309f31
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/coast/middleware.clj
@@ -142,11 +142,12 @@
(handler request)
(catch Exception e
((or error-fn server-error)
(assoc request :exception e
:stacktrace (with-out-str
(st/print-stack-trace e)))))))))))
(let [response ((or error-fn server-error)
(assoc request :exception e
:stacktrace (with-out-str
(st/print-stack-trace e))))]
(-> (assoc response :body (-> (:body response) h/html str))
(assoc-in [:headers "content-type"] "text/html; charset=utf-8")))))))))

(defn layout? [response layout]

0 comments on commit cfb3ed5

Please sign in to comment.
You can’t perform that action at this time.