Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print what field gives a serializa/deserialize error #42

Open
vrnvu opened this issue Jun 17, 2024 · 1 comment
Open

Print what field gives a serializa/deserialize error #42

vrnvu opened this issue Jun 17, 2024 · 1 comment

Comments

@vrnvu
Copy link

vrnvu commented Jun 17, 2024

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)

@josecelano
Copy link
Collaborator

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)

Hi @vrnvu I had the same problem when I started using the library. I think that would be a very useful feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants