lambdaclass / lambdaclass/eth-agent
Batch RPC throws on first error, losing successful results
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
If any item in a batch fails, the entire batch throws. This loses successful results.
Location
src/protocol/rpc.ts:157-163
Current Code
return results.map((r) => {
if (r.error) {
throw new RPCRequestError(...); // Throws on first error
}
return r.result;
}) as T;
Recommendation
- Return Result<T, Error> type for each item
- Or provide separate method for "all or nothing" vs "collect results"
- Document behavior clearly
Priority
High - Data loss in partial failure scenarios
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the batch RPC handling in src/protocol/rpc.ts:157-163 and trace how individual results and errors are represented. Decide whether batch calls should return per-item Result values or expose separate partial-success and all-or-nothing behavior. Done means successful results are no longer lost on partial failure and the behavior is documented clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100