serde-bencode icon indicating copy to clipboard operation
serde-bencode copied to clipboard

Print what field gives a serializa/deserialize error

Open vrnvu opened this issue 8 months ago • 1 comments

I was trying to write the PR myself but the code is quite confusing for me sorry.

The idea is that instead of a generic error:

Invalid Type: byte array (expected: a sequence)

A serializing library should give you the position, in this case we should know what field we are trying to parse:

Invalid Type for field "pieces": byte array (expected: a sequence)

vrnvu avatar Jun 17 '24 17:06 vrnvu