This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-25
Channels
- # announcements (3)
- # beginners (64)
- # calva (1)
- # cider (78)
- # clj-kondo (4)
- # clojure-losangeles (1)
- # clojure-uk (5)
- # clojuredesign-podcast (1)
- # clojurescript (15)
- # cursive (2)
- # datomic (19)
- # docker (7)
- # fulcro (17)
- # graalvm (1)
- # hugsql (1)
- # instaparse (2)
- # jobs-discuss (25)
- # joker (2)
- # luminus (1)
- # off-topic (20)
- # pathom (1)
- # pedestal (2)
- # reagent (5)
- # shadow-cljs (83)
- # spacemacs (11)
- # vim (1)
- # vscode (13)
As the pedestal documentation mentioned if one of the error-ceptors in the chain returns context the execution happens on the left part for the remaining interceptors, am I right? so why other interceptors after this one also run their error part and why the spy print an exception?
{:name ::known-error
`:error (fn [context e]`
`(-> context`
`(assoc :response`
`{:status 400`
`:body {:interceptor (e :interceptor)`
`:exception (e :exception)}`
`:header {}}))`
`(timbre/spy)}`
@UGR3UQULA thanks for posting your question! There are a few issues with that error handler. Firstly, e
in the code above is an ExceptionInfo
instance not a fn or fn-like. Secondly, I suspect you intended to thread the context through (timbre/spy)
.