This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-12
Channels
- # admin-announcements (8)
- # alda (11)
- # announcements (53)
- # architecture (2)
- # aws (10)
- # beginners (69)
- # boot (403)
- # braid-chat (160)
- # cider (10)
- # cljs-dev (14)
- # cljsjs (26)
- # cljsrn (34)
- # clojure (223)
- # clojure-art (1)
- # clojure-brasil (4)
- # clojure-dev (10)
- # clojure-france (1)
- # clojure-gamedev (1)
- # clojure-nl (14)
- # clojure-russia (20)
- # clojure-seattle (8)
- # clojure-sg (1)
- # clojurebridge (2)
- # clojurescript (156)
- # code-reviews (2)
- # community-development (305)
- # cursive (5)
- # datavis (33)
- # datomic (38)
- # devcards (4)
- # dirac (39)
- # dunaj (3)
- # emacs (5)
- # events (2)
- # funcool (45)
- # hoplon (3)
- # instaparse (24)
- # jobs (2)
- # ldnclj (77)
- # lein-figwheel (4)
- # leiningen (1)
- # mount (49)
- # nyc (14)
- # off-topic (52)
- # om (125)
- # omnext (4)
- # onyx (13)
- # other-lisps (1)
- # overtone (8)
- # parinfer (31)
- # plastic (6)
- # portland-or (3)
- # quil (4)
- # re-frame (6)
- # reading-clojure (16)
- # reagent (212)
- # ring-swagger (11)
- # robots (5)
- # spacemacs (4)
- # specter (1)
- # yada (26)
is because your handler returns a http response instead of doing the websocket handshake
There no other way to see a clear error because websocket impl in the browser just does that
@niwinz: Not sure why the server would be returning an http response instead of the websocket handshake.
This is my route: [:any "postal" (pc/router #'handlers/postal-handler)]
And an example handler:
(defmulti postal-handler
(fn [ctx frame] (select-keys frame [:type :dest])))
(defmethod postal-handler {:type :subscribe
:dest :reports}
[ctx frame]
(letfn [(on-connect [{:keys [in out] :as context}]
(println "connect")
(go
(>! out (pc/frame {:value "test"}))))]
(pc/socket ctx on-connect)))
Catacumba 0.10.0 does the same? Is for discard something that I have broken in the last release
Can you paste the both lines you are using to connect to catacumba: the subscribe and the socket ?
[instream outbus] (pc/socket client :messages)
and bus (pc/subscribe client :messages)
where (def client (pc/client (str (.-origin js/location) "/postal")))
the error surelly is hapens because me message arribes but it does not routes to appropiate handler
How do you guys do error handling with core.async channels with catacumba?
something along the lines of:
(go
(let [groups (<! groups-chan)]
(if (instance? Throwable groups)
(throw groups)
(ct/delegate {:groups groups}))))))
does not seem to work because catacumba is obviously listening to the channelhi @mitchelkuijpers! In my code I try to isolate the logic and corresponding possible error raising code in separate functions and in catacumba handlers just use that functions and capture posible errors and return corresponding http request with error...
Aha that sounds reasonable, I don’t really see a generic solution to this problem. Maybe I should just use a promise
But now I see that there no way to use the generic error handling mechanism that catacumba have... with async values
Ok no problem
This can be used with simple handlers. If simple handler raises an exception that error handler will be executed
Yes I know we use that
Maybe fun to know, we are currenlty running in production for about 3 months now with catacumba: https://marketplace.atlassian.com/plugins/nl.avisi.jira.plugins.relations-for-jira/cloud/overview
Yes maybe it should but currently it doesn’t right?
@mitchelkuijpers: thanks for sharing! It is awesome!
Ow awesome
Thank you sir