You are working on the python-attrs/cattrs repository. The source code is checked out at /testbed at commit…
You are working on the python-attrs/cattrs repository. The source code is checked out at /testbed at commit…: a task in SWE-Lego-RL-2699 (Harbor dataset). I am structuring a TypedDict type. The input is arbitrary (from JSON), and I want to offload the validation to cattrs. The problem is, if the…
The task
I am structuring a TypedDict type. The input is arbitrary (from JSON), and I want to offload the validation to cattrs. The problem is, if the input is not a `dict` (in my case, not a JSON object), cattrs raises an `AttributeError` instead of the expected `cattrs.errors.ClassValidationError`.
Part of Lego-X/Lego-RL-2699.