Replies: 1 comment
-
Also to add: it's quite difficult to compose errors currently because I believe that Encode is not implemented for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to open up a discussion around the error type of the decoder:
I notice that the decode errors are quite cryptic when working with collections and it can be quite hard to figure out what's going on. For example, using
Vec<T>
whereT
is decoded using a derivedNifMap
implementation produces the following error:** (ErlangError) Erlang error: "Could not decode field :attributes on %{}"
. There is no indication what went wrong or in which position this occurred.Now I can improve the situation by changing the implementation of
Decoder
forVec<_>
but before I do that: is this something that has been discussed before?Would it be possible to change the error type of decode to include nested path information without introducing breaking changes? Something like
Beta Was this translation helpful? Give feedback.
All reactions