Skip to content

fix: add CLI validation and improve error handling#29

Merged
satoshai-dev merged 1 commit intomainfrom
fix/cli-validation-and-error-handling
Feb 24, 2026
Merged

fix: add CLI validation and improve error handling#29
satoshai-dev merged 1 commit intomainfrom
fix/cli-validation-and-error-handling

Conversation

@satoshai-dev
Copy link
Copy Markdown
Owner

Summary

  • Error on --output with multiple contracts (prevents silent overwrite)
  • Error on --stdout with multiple contracts (prevents invalid output)
  • Wrap fetch() to provide context on network errors
  • Wrap response.json() to handle malformed API responses

Closes #1, closes #2, closes #3, closes #4

Test plan

  • pnpm build passes
  • pnpm test — 26 tests pass
  • pnpm typecheck — clean
  • pnpm lint — clean
  • abi-cli fetch SP1.a,SP2.b --output x.ts → clear error
  • abi-cli fetch SP1.a,SP2.b --stdout → clear error

🤖 Generated with Claude Code

- error on --output with multiple contracts (prevents silent overwrite)
- error on --stdout with multiple contracts (prevents invalid output)
- wrap fetch() to provide context on network errors
- wrap response.json() to handle malformed API responses

Closes #1, closes #2, closes #3, closes #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@satoshai-dev satoshai-dev merged commit 0b65d07 into main Feb 24, 2026
1 check passed
@satoshai-dev satoshai-dev deleted the fix/cli-validation-and-error-handling branch February 24, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant