This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-20
Channels
- # 100-days-of-code (2)
- # aleph (53)
- # architecture (2)
- # aws (3)
- # beginners (230)
- # boot (15)
- # calva (3)
- # cider (19)
- # cljs-dev (1)
- # clojure (139)
- # clojure-conj (3)
- # clojure-italy (47)
- # clojure-nl (19)
- # clojure-spec (26)
- # clojure-uk (98)
- # clojurescript (152)
- # clojutre (4)
- # core-async (22)
- # cursive (5)
- # datomic (48)
- # emacs (11)
- # events (1)
- # figwheel-main (219)
- # fulcro (15)
- # instaparse (3)
- # jobs (4)
- # jobs-rus (1)
- # leiningen (30)
- # luminus (8)
- # off-topic (67)
- # onyx (5)
- # pedestal (16)
- # re-frame (1)
- # reagent (4)
- # reitit (31)
- # ring (8)
- # ring-swagger (3)
- # shadow-cljs (115)
- # specter (4)
- # videos (1)
- # vim (20)
- # yada (15)
in http://pedestal.io/reference/interceptors#_example , a sample interceptor is like this
interceptor?
only checks for the type:
(defn interceptor?
[o]
(= (type o) Interceptor))
You might want to use (satisfies? IntoInterceptor t)
which is what io.pedestal.interceptor/interceptor
uses to as a pre-condition.
https://github.com/pedestal/pedestal/blob/master/interceptor/src/io/pedestal/interceptor.clj#L78
i tried to update to pedestal 0.5.4 from 0.5.3 and io.pedestal.interceptor.chain/enqueue
threw AssertionError in my codebase because I enqueue hash-map based interceptor like my hello-world
example above
so sth like (io.pedestal.interceptor.chain/enqueue ctx [(io.pedestal.interceptor/interceptor hello-world)])
it's because in pedestal 0.5.3 the pre assertion doesn't work https://github.com/pedestal/pedestal/blob/0.5.3/interceptor/src/io/pedestal/interceptor/chain.clj#L273-L281
it's fixed in 0.5.4 which throw assertion errors in my codebase https://github.com/pedestal/pedestal/blob/0.5.4/interceptor/src/io/pedestal/interceptor/chain.clj#L273-L281