Skip to content

fix(ethrpc): preserve non-batch errors in BatchCall - #215

Open
wangjingshuiku wants to merge 1 commit into
0xsequence:masterfrom
wangjingshuiku:wangjingshuiku-maint-20260824
Open

fix(ethrpc): preserve non-batch errors in BatchCall#215
wangjingshuiku wants to merge 1 commit into
0xsequence:masterfrom
wangjingshuiku:wangjingshuiku-maint-20260824

Conversation

@wangjingshuiku

@wangjingshuiku wangjingshuiku commented Aug 24, 2026

Copy link
Copy Markdown

BatchCall currently shadows the error returned by Provider.Do while checking whether it is a BatchError. When the assertion fails, the non-batch branch wraps the zero value introduced by the assertion instead of the original transport or RPC error.

This change keeps the original error in scope and adds a regression test that uses a failing HTTP transport to verify that callers can still inspect it with errors.Is.

The targeted package test requires the repository's testchain during package initialization. In my environment it stops before running the selected test with ethtest: unable to connect to testchain.

Signed-off-by: wangjingshuiku <wangjingshuiku@163.com>
@wangjingshuiku
wangjingshuiku requested a review from a team August 24, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant