This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-22
Channels
- # beginners (124)
- # boot (7)
- # cider (73)
- # cljs-dev (37)
- # cljsrn (6)
- # clojure (85)
- # clojure-greece (4)
- # clojure-italy (67)
- # clojure-nl (6)
- # clojure-russia (4)
- # clojure-spec (6)
- # clojure-uk (48)
- # clojurescript (26)
- # cursive (5)
- # data-science (23)
- # datomic (63)
- # editors (5)
- # emacs (4)
- # graphql (13)
- # immutant (2)
- # lumo (4)
- # mount (3)
- # off-topic (1)
- # onyx (4)
- # pedestal (7)
- # portkey (10)
- # re-frame (14)
- # reagent (10)
- # ring-swagger (18)
- # shadow-cljs (97)
- # spacemacs (1)
- # tools-deps (9)
- # vim (1)
- # yada (13)
I kind of remember seeing an issue that an async interceptor that adds a :response to the context doesn't trigger the leave
state; I'm seeing this, where interceptor #1 adds a valid :response key to the context inside a go block, and interceptor #2 still executes normally (causing big problems for my app).
I've added more logging, and in the enter
of my second interceptor:
:parse-query :response {:status 400, :headers {}, :body {:errors [{:message "Stored query not found."}]}}
So my first interceptor is terminating correctly, by adding a valid :response key, but my second interceptor is still executing.With more logging:
05.558 DEBUG io.pedestal.interceptor.chain - {:interceptor :com.walmartlabs.lacinia.pedestal/query-source, :stage :enter, :execution-id 11, :fn #object[com.walmartlabs.lacinia.pedestal$pass_query_through_query_source$fn__26193 0x3fff323d "com.walmartlabs.lacinia.pedestal$pass_query_through_query_source$fn__26193@3fff323d"], :line 50}
:store-result #object[clojure.core.async.impl.channels.ManyToManyChannel 0x6778b666 "clojure.core.async.impl.channels.ManyToManyChannel@6778b666"]
:assoc-bad-request-response
05.559 DEBUG io.pedestal.interceptor.chain - {:in process-all, :handling :enter, :execution-id 11, :line 154}
05.560 DEBUG io.pedestal.interceptor.chain - {:interceptor :com.walmartlabs.lacinia.pedestal/query-parser, :stage :enter, :execution-id 11, :fn #object[com.walmartlabs.lacinia.pedestal$query_parser_interceptor$fn__26164 0x310e7b84 "com.walmartlabs.lacinia.pedestal$query_parser_interceptor$fn__26164@310e7b84"], :line 50}
:parse-query :response {:status 400, :headers {}, :body {:errors [{:message "Stored query not found."}]}}
05.561 DEBUG io.pedestal.interceptor.chain - {:in check-terminators, :terminate? true, :execution-id 11, :line 96}
05.561 DEBUG io.pedestal.interceptor.chain - {:in leave-all, :execution-id 11, :line 241}
I'd expect the :in check-temrinators
to occur after the query-source interceptor, but it get delayed until the query-parser interceptor. The first is async, the second is standard.@U04VDKC4G sorry for the delayed response but I’ve been traveling. Not sure if you’ve opened a defect yet but I’ll try to reproduce later today. Thanks for posting the details of the issue!