re-graph icon indicating copy to clipboard operation
re-graph copied to clipboard

Spec assertion failed, perhaps because of trim-v interceptor

Open joshcho opened this issue 1 year ago • 1 comments

I am setting up as follows:

(rf/dispatch [::re-graph/init
                {:http {:url "http://localhost:8888/api"}}])

Getting this error

Uncaught Error: Spec assertion failed
-- Spec failed --------------------

  [{:http {:url "http://localhost:8888/api"}}]

should satisfy

  map?

I think this may be because I register rf/trim-v as a global register using rf/reg-global-interceptor. How would I resolve this situation?

joshcho avatar Jun 02 '23 08:06 joshcho

Hi,

I think your assumption is a good one. I'm not really sure how libraries are mean to cope with that, unless the untrimmed value is still available in the effect (which I think it is). Just to confirm, if you remove your global trim-v does it work?

Cheers

oliyh avatar Jun 02 '23 10:06 oliyh