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)}`
@tajoddin.shima 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)
.