lambdaclass / lambdaclass/eth-agent

Create consolidated error code reference catalog

Open
#46 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
TypeScript
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Problem

Error codes and types are scattered across multiple files. There's no single reference for all possible errors and how to handle them.

Current State

Errors defined in:

  • src/agent/errors.ts
  • src/protocol/rpc.ts
  • Various other modules

Impact

  • Developers can't easily find all error types
  • No guidance on error recovery strategies
  • Difficult to build comprehensive error handling

Recommendation

Create docs/errors.md with:

  1. Complete Error Catalog
Code Name Description Recovery
INSUFFICIENT_FUNDS InsufficientFundsError Wallet lacks funds Check balance, request funds
NONCE_TOO_LOW NonceTooLowError Transaction nonce conflict Retry with fresh nonce
... ... ... ...
  1. Error Hierarchy Diagram

  2. Code Examples

try {
  await wallet.sendUSDC(to, amount);
} catch (error) {
  if (error instanceof InsufficientFundsError) {
    // Handle insufficient funds
  } else if (error instanceof RPCRequestError) {
    // Handle RPC issues
  }
}

Priority

Medium - Developer experience

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/agent/errors.ts and src/protocol/rpc.ts, then inspect the other error-defining modules to identify the complete set of codes and types. Create docs/errors.md with the catalog, recovery guidance, hierarchy diagram, and TypeScript handling examples; done means developers have one reference covering all identified errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.