Skip to content

Conversation

@genixpro
Copy link

@genixpro genixpro commented Nov 26, 2023

Previously this code was just crashing if I attempted to decode JSON with a field missing. Now it will crash with an error message that indicates more precisely what is actually happening.

…ng, rather than just allowing the default exception which is hard to interpret.
@george-zubrienko
Copy link
Collaborator

@genixpro looks like this breaks the test suite:

raise TypeError(
f"The JSON data is missing the required field '{field.name}' when decoding {cls.name} from JSON."
)

Maybe you can have a look why?

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.

2 participants