Prevent compojure-api handle unknown exceptions

next
Marcin Kulik 7 years ago
parent ce92ccd6e1
commit a87b76cc60

@ -7,8 +7,12 @@
[ring.util.http-response :as response]
[schema.core :as s]))
(defn exception-handler [^Exception e data request]
(throw e))
(defn asciicasts-endpoint [{:keys [db file-server]}]
(api
{:exceptions {:handlers {:compojure.api.exception/default exception-handler}}}
(context
"/a" []
(GET "/:token.json" []

Loading…
Cancel
Save