pedestal

souenzzo 2019-03-28T01:27:40.057500Z

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?

souenzzo 2019-03-28T17:33:19.002100Z

There is a bug with async interceptors in pedestal.ions. I will try to isolate

souenzzo 2019-03-28T17:59:42.002300Z

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

2019-03-28T19:41:39.002700Z

@souenzzo going async is not supported at this time. Refer to https://github.com/pedestal/pedestal.ions#caveats

souenzzo 2019-03-28T20:26:09.003100Z

it can throw a error? it was quite difficult to debug

2019-03-28T21:16:41.003400Z

Hmm, yes. I’ll look into that

👍 1