reitit

athomasoriginal 2024-10-17T20:57:14.873979Z

In the you event you accidentally defined two routes with the same name in your ring-handler like:

(reitit/router
  ["/"
    ["/"       {:name :home}]
    ["/no-home {:name :home}"]]
  {:data 
   {:middleware [multipart/multipart-middleware
                 exception-middleware
                 muuntaja/format-middleware
                 ring.coercion/coerce-request-middleware]}})
Reitit seems to silently fail. I have exception-middleware added and i’ve set the default key, but this doesn’t seem to work.
(def exception-middleware
  (middleware.exception/create-exception-middleware
     (merge
       ::default (fn [e] {:status 500 :body "anything"}))))
The exception handler is catching other exceptions, just not the one thrown by reitit-router failing to build