This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-24
Channels
- # announcements (2)
- # beginners (130)
- # calva (72)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (3)
- # cljsrn (2)
- # clojars (4)
- # clojure (55)
- # clojure-nl (1)
- # clojure-uk (19)
- # clojurescript (46)
- # cursive (95)
- # datomic (6)
- # figwheel (40)
- # fulcro (12)
- # hyperfiddle (3)
- # off-topic (11)
- # onyx (3)
- # parinfer (6)
- # pathom (15)
- # protorepl (38)
- # re-frame (67)
- # reitit (18)
- # shadow-cljs (45)
- # tools-deps (2)
it seems to be caused by something in the request but since it doesn't tell me what's wrong i can't debug it
{:problems [],
:value nil,
:type "reitit.coercion/request-coercion",
:spec
"(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:spec$54129/id :spec$54129/object :spec$54129/type :spec$54129/actor]), :type :map, :spec-tools.parse/key->spec {:id :spec$54129/id, :object :spec$54129/object, :type :spec$54129/type, :actor :spec$54129/actor}, :spec-tools.parse/keys #{:type :id :object :actor}, :spec-tools.parse/keys-req #{:type :id :object :actor}})",
:coercion "spec",
:in ["request" "body-params"]}
oh, yes, the :value
. Have you tried the dev middleware / Interceptors? Log the diffs between steps, makes things more visible
https://github.com/metosin/reitit/blob/master/examples/ring-swagger/src/example/server.clj
Idea: as the Middleware, Interceptors & Controllers are just data, it would be easy to add specific logic for different profiles (production|development). E.g. the dev-middleware chain transformer could use the mw-spesific code if it exists, .e.g. :dev/before
and :dev/after
keys in the mw. The content negotiation middleware could print in plain (expound-style) english what it did or didn’t.