This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-15
Channels
- # aleph (24)
- # announcements (8)
- # babashka (27)
- # beginners (55)
- # biff (4)
- # calva (32)
- # cider (5)
- # clj-kondo (11)
- # clojure (59)
- # clojure-android (3)
- # clojure-australia (1)
- # clojure-belgium (6)
- # clojure-dev (21)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojurescript (19)
- # css (1)
- # data-science (10)
- # datahike (17)
- # events (3)
- # figwheel-main (4)
- # honeysql (1)
- # hugsql (5)
- # hyperfiddle (1)
- # jobs (1)
- # leiningen (3)
- # lsp (6)
- # malli (5)
- # meander (4)
- # nbb (6)
- # off-topic (87)
- # pathom (19)
- # portal (2)
- # re-frame (4)
- # reitit (6)
- # releases (1)
- # remote-jobs (3)
- # shadow-cljs (29)
- # sql (8)
- # tools-deps (6)
- # xtdb (7)
I'm getting a 403 for three out of four routes that seem like they're configured the same way. Any hints on debugging that?
nevermind; I needed to wrap those inputs in a form. seems like a weird error for that
I'm guessing it's because biff/form
adds a CSRF token--the 403 error is probably being thrown by ring.middleware.anti-forgery/wrap-anti-forgery
.
For debugging hints in general, when there's not anything useful in the terminal output, I often check the browser's network tab and inspect the request headers/body. e.g. in this case, if you compared the working request to one of the failed requests, maybe you'd see that the working one included a CSRF token.
Might be worth having Biff throw a more specific error for this 🤷
I also discovered that I had an extra form being added by the ui element that did work, and when I added the outer form, I started getting a vector of two tokens. the error was confusing then too, but fortunately I had added a tap>
to my own middleware