mashumaro
mashumaro copied to clipboard
Raise the most internal exception when parsing nested dataclasses
Currently when an exception happens in a nested dataclass object, the caller will only get context about the most high level parent dataclass which triggered the exception. This makes it tricky to understand the root cause of the validation issues.
When a field is invalid, we re-raise the child exception so it's easier to pin-point exactly where it occurred.