This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-02
Channels
- # admin-announcements (1)
- # alda (3)
- # beginners (28)
- # boot (155)
- # braid-chat (8)
- # cider (22)
- # cljs-dev (46)
- # cljsrn (24)
- # clojure (94)
- # clojure-belgium (23)
- # clojure-czech (2)
- # clojure-germany (7)
- # clojure-greece (12)
- # clojure-india (1)
- # clojure-japan (1)
- # clojure-russia (118)
- # clojure-spain (18)
- # clojure-spec (40)
- # clojure-sweden (19)
- # clojure-taiwan (4)
- # clojure-uk (5)
- # clojurescript (185)
- # clojutre (10)
- # community-development (5)
- # core-logic (11)
- # css (5)
- # cursive (7)
- # datomic (5)
- # dirac (6)
- # emacs (2)
- # euroclojure (1)
- # events (5)
- # hoplon (355)
- # instaparse (3)
- # jobs-rus (5)
- # lein-figwheel (2)
- # leiningen (5)
- # mount (11)
- # off-topic (8)
- # om (20)
- # onyx (10)
- # other-languages (87)
- # perun (9)
- # proton (1)
- # re-frame (21)
- # reagent (16)
- # specter (28)
- # tmp-json-parsing (5)
- # untangled (19)
- # yada (43)
@imre: yada is def decoding params from the path and query-string for me - with specs like this - https://www.refheap.com/01eb7208a3283169d6e578761
ahhh, i see what you mean @imre - may brain didn't supply the 'url' bit of 'urldecode'... ignore me
@imre I believe it's bidi that doing the parameter extraction - there is a reason why bidi does not decode (because there are some situations where you want the encoded version), so it defers the choice to the user (which is a kind of clojure style)
not sure about query params, I'd have to check the code
I did once do some auto param decoding in bidi and there were a certain number of users who made valid complaints - it was a while ago and I can't remember the specifics
@imre can you do your own decoding in this case?
or is it blocking you?
not sure if the ideal point would be bidi or yada - does yada deal with urls directly at all or just relies on bidi to do that?
just a supporting example: you ask Java, what the 2nd character (0-based) of "a\nb"
is and you'll get b, not n
this question isn't really related to yada, but does anyone ever work with manifold streams?
how can you make a distinction between a stream successfully closing after having processed all elements or a stream being closed because of an error?
@stijn: Not sure if this answers your question, but see things like https://github.com/ztellman/manifold#deferreds where Exceptions are mentioned. Errors can be handled in this way.
@stijn: i use streams - i use on-closed
and on-drained
handlers to clean up, and encode errors in the values on the stream - i don't have any concept of 'complete' though - my streams don't have a logical end
you could use sentinel values to represent logical stream ends
so a question about exceptions again, I have GET with a query param that is a long, when I send a string, I get a yada
exception in the yada format:
{
"status": 400,
"message": "Bad Request",
"id": "552fbba4-6f84-4261-884b-113d735a760a",
"error": {
"error": "clojure.lang.ExceptionInfo: {:status 400, :errors ([:query <#C1923ED97>.utils.ErrorContainer{:error {:id (not (integer? a-java.lang.String))}}])}",
"data": "{:status 400, :errors ([:query <#C1923ED97>.utils.ErrorContainer{:error {:id (not (integer? a-java.lang.String))}}])}"
}
}
is there a way to change this behavior?
or only change the error+data content?
Yes, you can use 'status responses'. It's in the docs. I'll find a link for you
Exception handling is a work-in-progress but you can workaround things if you're happy to add your own interceptors
Thanks Malcom I am checking