dataclasses-json icon indicating copy to clipboard operation
dataclasses-json copied to clipboard

Added in a more user-friendly error message for when a field is missi…

Open genixpro opened this issue 1 year ago • 1 comments

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.

genixpro avatar Nov 26 '23 14:11 genixpro

@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?

george-zubrienko avatar Nov 27 '23 20:11 george-zubrienko