Commit 8fdfbd5
committed
fix(iterator): raise TypeTransformerFailedError with a message to prevent IndexError in callers
IteratorTransformer.to_python_value previously raised TypeTransformerFailedError()
with no arguments. Callers in promise.py, base_task.py, and base_connector.py all
access exc.args[0] to enrich the error message; with an empty args tuple this caused
an IndexError that swallowed the original type conversion failure entirely.
Replace the bare except/re-raise with an explicit None-check on lv.collection and
raise TypeTransformerFailedError with a descriptive message, ensuring exc.args[0]
is always valid.1 parent d42ce0f commit 8fdfbd5
2 files changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments