This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-17
Channels
- # adventofcode (23)
- # announcements (2)
- # aws (11)
- # babashka (181)
- # beginners (59)
- # chestnut (2)
- # clj-kondo (9)
- # clojure (90)
- # clojure-brasil (2)
- # clojure-europe (18)
- # clojure-italy (24)
- # clojure-nl (9)
- # clojure-spec (3)
- # clojure-uk (28)
- # clojured (4)
- # clojuredesign-podcast (3)
- # clojurescript (12)
- # community-development (49)
- # core-async (49)
- # cryogen (5)
- # cursive (16)
- # data-science (1)
- # datascript (7)
- # datomic (54)
- # defnpodcast (4)
- # events (2)
- # figwheel-main (14)
- # fulcro (139)
- # graphql (1)
- # jobs-discuss (6)
- # kaocha (1)
- # luminus (2)
- # malli (3)
- # music (1)
- # off-topic (34)
- # pathom (24)
- # re-frame (13)
- # reitit (5)
- # shadow-cljs (8)
- # test-check (6)
I'm looking at https://github.com/metosin/reitit/blob/9ae40832708bb0f5b99c738a49c7525db2f8a652/modules/reitit-ring/src/reitit/ring.cljc#L224-L225 and wondering whether it is meant to use the not-found-handler
like the other branch below it?
https://github.com/metosin/reitit/blob/9ae40832708bb0f5b99c738a49c7525db2f8a652/modules/reitit-ring/src/reitit/ring.cljc#L229-L230
Often nil
is equivalent to {:status 404}
in Ring, except if you have further middleware which adds headers to the response
Then, a map with headers but no status is implicitly treated as 200
@danielcompton not 100% sure, but the latter one is for cases where the handler is mounted inside the routing tree and the path (and method) have already matched. You actually might want to return "file not found". The first one is when it's mounted outside of the route tree, and it might be good idea to pass it on to next, e.g. redirect-trailing-slash-handler