Fork me on GitHub

Hi guys, I’m new here 😄 I have a question about the short-circuit logic. It seems to be not working in the way I understand it. I’m on 0.5.3 and if I try to return a response from any interceptor, the next one is called and ends up overriding the already set response.


Is there anything that needs to be enabled in order to make it work as it’s written on the docs? I already spent few hours on this without finding a solution


@francesco686 are you calling io.pedestal.interceptor.chain/terminate prior to providing the response? Like this:

(if-not (= id expected-id)
  (-> context
      (assoc :response {:status 401 :body {:message "Unauthorized"}})))


@jjttjj no, I thought this step was not need. Also going back to the 24th of March, some guys in this channel were actually saying it was not needed. Link:


ah, found out, I was missing the :headers key on the response object. Without that, the terminator interceptor is not injected.