Fork me on GitHub
#pedestal
<
2020-01-25
>
Shima15:01:20

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)}`

ddeaguiar20:01:40

@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) .