This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-02
Channels
- # boot (227)
- # carry (1)
- # cljs-dev (3)
- # cljsjs (2)
- # cljsrn (19)
- # clojars (2)
- # clojure (93)
- # clojure-belgium (1)
- # clojure-dev (2)
- # clojure-italy (1)
- # clojure-spec (22)
- # clojure-uk (5)
- # core-async (15)
- # cursive (33)
- # emacs (8)
- # ethereum (1)
- # hoplon (3)
- # jobs (2)
- # leiningen (1)
- # off-topic (24)
- # om (32)
- # perun (1)
- # protorepl (1)
- # re-frame (13)
- # reagent (53)
- # rethinkdb (4)
- # ring-swagger (1)
- # vim (12)
- # yada (14)
Hmm, I'm trying to use edge to debug my issue with uri-for not being set on the ctx. But it's giving me
[{:type java.lang.NullPointerException
:message nil
:at [yada.redirect$redirect$fn__29953 invoke "redirect.clj" 15]}]
when I browse to localhost:3000.Let me check, I pushed to edge yesterday
It's working OK for me at / - which URI are you going to that yields that error?
Yes, yada.redirect should really check that (:uri ctx)
is not nil before calling it
which version of bidi are you using ?
I think this is a regression in a later version of bidi (my fault!)
I recently changed (:uri-for)
to (:uri-info)
in bidi without remembering yada uses that key. So if your version of bidi is too recent it will break. I'll update yada to fix the nil error on redirect and to being in the later version of bidi
The rationale for my change was that it's really unintuitive that uri-for returns a map not a string.
Is there not room for a (defn url helper fn?) something like:
(defn url
([ctx route]
(:path (uri-for ctx route)))
([ctx route params]
(:path (uri-for ctx route {:route-params params}))))
@malcolmsparks for edge I am just running the latest master, for my own try at oauth (following example in yada repo) I am using 2.0.11
The url is http://localhost:3000, the one recommended as the step after boot dev.