handshake-org / handshake-org/hs-client
Better error, better help when command is missing
- Dominant language
- JavaScript
- Stars
- 88
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
Both of these easy-to-make mistakes for new users need to provide better answers:
```
# hsd-rpc
AssertionError [ERR_ASSERTION]: Assertion failed.
at NodeClient.execute (/root/n/lib/node_modules/hs-client/node_modules/bcurl/lib/client.js:279:5)
at NodeClient.execute (/root/n/lib/node_modules/hs-client/lib/node.js:44:18)
at CLI.rpc (/root/n/lib/node_modules/hs-client/bin/hsd-cli:159:34)
at CLI.open (/root/n/lib/node_modules/hs-client/bin/hsd-cli:195:20)
at /root/n/lib/node_modules/hs-client/bin/hsd-cli:220:13
at Object. (/root/n/lib/node_modules/hs-client/bin/hsd-cli:222:3)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
# hsd-rpc help
Select a command.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the two commands shown in the issue, then start with the hsd-cli stack entries for CLI.rpc and CLI.open. Trace how a missing command reaches NodeClient.execute and how help is rendered. Done means both mistakes produce useful guidance instead of an assertion, and `hsd-rpc help` clearly explains the available command selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100