Fork me on GitHub
#luminus
<
2017-11-16
>
jumar05:11:36

@lucian303 I'm not sure what's the structure of your app, but try to look at env/dev/clj/<your_app_name>/dev_middleware.clj. In my app, this namespace contains following code:

(defn wrap-dev [handler]
  (-> handler
      wrap-reload
      wrap-error-page
      wrap-exceptions))
Notice, wrap-exceptions It uses this lib: https://github.com/magnars/prone And that means it only applies in dev profile

ikitommi07:11:51

@lucian303 your code snippet looks like compojure-api, so if you have your routes under api, it bundles with an middleware to handle all the exceptions. There is a guide in https://github.com/metosin/compojure-api/wiki/Exception-handling

lucian30318:11:04

@ikitommi thank you. i didn't realize it was adding that exception handler. i changed it to defroutes and it's working now