Commit 7e181b9
fix(evm-wallet-experiment): surface underlying twin errors in multi-twin wrapper
The `away-coordinator.transferNative` / `transferFungible` wrappers
(introduced in PR #939 when the coordinator was split) wrap per-twin
rejections as `throw new Error('All delegation twins failed', { cause: errors })`.
The kernel's RPC error serialization only propagates `Error.message`,
not `Error.cause`, so callers (including `run-delegation-twin-e2e.mjs`)
only see the generic "All delegation twins failed" — which loses the
actual reason (e.g. "Insufficient budget: requested 3, remaining 2").
Concatenate the cause messages into the wrapper's message text so the
specific per-twin rejection reason survives to the caller. Keep the
structured `cause` array intact for programmatic consumers.
Unblocks the "enforces cumulativeSpend locally" assertion in the
delegation-twin docker e2e test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cd4065c commit 7e181b9
1 file changed
Lines changed: 16 additions & 2 deletions
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1811 | 1811 | | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | | - | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
1815 | 1822 | | |
1816 | 1823 | | |
1817 | 1824 | | |
| |||
1852 | 1859 | | |
1853 | 1860 | | |
1854 | 1861 | | |
1855 | | - | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
1856 | 1870 | | |
1857 | 1871 | | |
1858 | 1872 | | |
| |||
0 commit comments