ARK-Builders / ARK-Builders/ark-core
`ark-cli`: Improve Error Handling
- Dominant language
- Rust
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
- [ ] Certain functions return errors as plain strings, particularly in `src/util.rs` functions like `discover_roots` and `provide_root`. This approach is suboptimal; it's preferable to return existing error types or define custom ones (or use `anyhow`).
- [ ] Eliminate Unnecessary Panicking in the CLI:
- For example, `Command::Render` code contains `unwrap()` statements. We should remove these to avoid panics.
Contributor guide
Research direction
Start by reading src/util.rs, especially discover_roots and provide_root, then inspect the Command::Render code for the reported unwrap() calls. Determine which existing or custom error approach fits the project, replace plain-string errors and unnecessary panics, and verify that these paths return handled errors instead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100