Fork me on GitHub
#reitit
<
2019-05-31
>
ikitommi11:05:54

@phil is that exception coming after the exception handler? if that is, then some of your exception data contains non-edenizable things in the ex-data you are exposing. You could walk the data and stringify… but easy way to see the data after that middleware is to turn on middleware debug logging: https://cljdoc.org/d/metosin/reitit/0.3.7/doc/ring/default-middleware#inspecting-middleware-chain

👍 4
ikitommi11:05:28

@josesanch there is a ring middleware for it, but with reitit, the coercion takes care of keywordizing all parameter types: for example in the reqyest, :query-params have string keys, but after coercion, the coerced parameters are under [:parameters :query] with keys keywordized.

ikitommi11:05:31

here are the parameter types & info how the keys are keywordized in coercion: https://github.com/metosin/reitit/blob/master/modules/reitit-core/src/reitit/coercion.cljc#L35-L42

ikitommi11:05:53

e.g. all but :body params are keywordized & validated as open (allowing other keys than the schema/spec defines)