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

Better error messages for nested structs #224

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

virtuald
Copy link

@virtuald virtuald commented Mar 7, 2023

  • dicts now have the key name in them
  • lists/tuples now have the index in them

Old error message:

dacite.exceptions.WrongTypeError: wrong value type for field "t.t2.name" - should be "str" instead of value "1" of type "int"

New error message:

dacite.exceptions.WrongTypeError: wrong value type for field "t[name].t2[0].name" - should be "str" instead of value "1" of type "int"

virtuald added 3 commits March 6, 2023 20:38
- dicts now have the key name in them
- lists/tuples now have the index in them
- Previously just raised original exception, now includes the field name
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

Successfully merging this pull request may close these issues.

1 participant