https://github.com/pedestal/pedestal-ions-sample/blob/master/src/ion_sample/ion.clj#L29
When I call some methods like this in my app, it returns nil
. What it means?
There is a bug with async interceptors in pedestal.ions. I will try to isolate
(let [routes #{["/sync" :get {:name ::sync
:enter (fn [ctx]
(assoc ctx :response {:body "sync"
:status 201}))}]
["/async" :get {:name ::async
:enter (fn [ctx]
(async/go
(assoc ctx :response {:body "async"
:status 202})))}]}
h (-> {::http/routes routes
::http/chain-provider provider/ion-provider}
http/default-interceptors
http/create-provider)]
(h {:uri "/sync"
;:uri "/async"
:request-method :get}))
@souenzzo going async is not supported at this time. Refer to https://github.com/pedestal/pedestal.ions#caveats
it can throw a error? it was quite difficult to debug
Hmm, yes. I’ll look into that