Errors when missing arguments
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3
- Forks
- 0
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 9
Description
Description
A customer reported that after running dnsimple record list, he would have expected some help/hint, not an error:
> dnsimple records list
Error: accepts 1 arg(s), received 0
I would have expected the full help page after this error message, like on
dnsimple records, so I understand what argument is expected
I think we don't need to show a full help page, but showing what type of argument is expected is better than just accepts 1 arg(s). This is more obvious when you run dnsimple records get without parameters.
> dnsimple records get
Error: accepts 2 arg(s), received 0
Expected Behavior or Outcome
- Missing arguments actually shows what arguments are missing.
Acceptance Criteria
-
dnsimple records listwithout an argument shows that a zone name is missing -
dnsimple records getwithout an argument shows that a zone and a record ID are missing.
Resources/References
https://dnsimple.groovehq.com/tickets/526508
Notes
None
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 at the dnsimple records list and dnsimple records get command entry points and trace their argument validation. Check how the existing argument-count errors are produced, then run both commands without parameters; done means each reports the missing zone name, or zone and record ID, rather than only the counts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100