Commit 4a47e4c
fix(client): guard _convert_nested_value to_dict fallback with callable()
Third Copilot review on #729: ``hasattr(value, "to_dict")`` would
accept a non-callable ``to_dict`` attribute and then raise
``TypeError`` at the call. Use ``getattr(...) + callable(...)`` so
the fallback can't introduce a new failure mode on exotic attrs-like
objects that expose ``to_dict`` as a property or similar.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fc7de8b commit 4a47e4c
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | | - | |
297 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| |||
0 commit comments