mashumaro icon indicating copy to clipboard operation
mashumaro copied to clipboard

Raise the most internal exception when parsing nested dataclasses

Open hellais opened this issue 1 year ago • 0 comments

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.

hellais avatar Sep 14 '22 14:09 hellais