Closed okknudsen closed 1 year ago
Right, the humanize code is effectively trying to do (assoc [] :x error)
, which fails.
I guess I could add a special case to -push-in
or -push
that detects trying to push a non-integer key into a vector. Transforming the value to a map would probably be the right call. That doesn't feel right though.
I guess another option would be to have :path []
for errors of this kind. The error is about the whole structure, not just the (nonexistant) :x
key. The right place to fix that would be ->path
in -multi-schema
.
What do you think @ikitommi ?
I guess fixing ->path
is the right thing to do. My proposal in PR #845
Discovered in version:
0.9.2
Still a problem in version0.10.1
(Sorry for the less than descriptive title. I had no clue what to call it.)
The following causes
malli.error/humanize
to throw an exception:The explained value is:
and the exception is: