mdp/explain blows up when the schema expects keywords as map keys, but finds strings as map keys instead.
(malli.dev.pretty/explain [:map-of :keyword [:map-of :keyword :any]] {"foo" {:bar 1}})
Execution error (IllegalArgumentException) at malli.error/-masked$fn (error.cljc:194).
find not supported on type: java.lang.String
java.lang.IllegalArgumentException: find not supported on type: java.lang.String
at clojure.lang.RT.find(RT.java:870)
at clojure.core$find.invokeStatic(core.clj:1553)
at clojure.core$find.invoke(core.clj:1549)
at malli.error$_masked$fn__47144.invoke(error.cljc:194)
at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:429)
at clojure.core$fn__8525.invokeStatic(core.clj:6909)
at clojure.core$fn__8525.invoke(core.clj:6889)
at clojure.core.protocols$fn__8257$G__8252__8266.invoke(protocols.clj:175)
at clojure.core$reduce_kv.invokeStatic(core.clj:6920)
at clojure.core$reduce_kv.invoke(core.clj:6911)
at malli.error$_masked.invokeStatic(error.cljc:194)
at malli.error$_masked.invoke(error.cljc:193)
at malli.error$_masked$fn__47144.invoke(error.cljc:194)
at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:429)
at clojure.core$fn__8525.invokeStatic(core.clj:6909)
at clojure.core$fn__8525.invoke(core.clj:6889)
at clojure.core.protocols$fn__8257$G__8252__8266.invoke(protocols.clj:175)
at clojure.core$reduce_kv.invokeStatic(core.clj:6920)
at clojure.core$reduce_kv.invoke(core.clj:6911)
at malli.error$_masked.invokeStatic(error.cljc:194)
at malli.error$_masked.invoke(error.cljc:193)
at malli.error$error_value.invokeStatic(error.cljc:361)
at malli.error$error_value.invoke(error.cljc:350)
at malli.dev.pretty$eval47289$fn__47291.invoke(pretty.cljc:37)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at malli.dev.virhe$_exception_doc.invokeStatic(virhe.cljc:178)
at malli.dev.virhe$_exception_doc.invoke(virhe.cljc:176)
at malli.dev.pretty$reporter$fn__47313.invoke(pretty.cljc:78)
at malli.dev.pretty$prettifier$fn__47322.doInvoke(pretty.cljc:93)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at malli.dev.pretty$explain.invokeStatic(pretty.cljc:99)
at malli.dev.pretty$explain.invoke(pretty.cljc:95)
at malli.dev.pretty$explain.invokeStatic(pretty.cljc:96)
at malli.dev.pretty$explain.invoke(pretty.cljc:95)
Explanation works as expected when there is no further schema nesting below the problematic key:
mdp/explain
blows up when the schema expects keywords as map keys, but finds strings as map keys instead.Explanation works as expected when there is no further schema nesting below the problematic key:
Explanation also works as expected when the problematic key is at the leaf level of nested maps: