Skip to content

Commit

Permalink
fix: Error handling to prevent panic (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan authored Mar 10, 2024
1 parent 446a5e1 commit 6a6acd6
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 289 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ isahc = "1.7.2"
reqwest = { version = "0.11.24", default-features = false }

# Errors
anyhow = "1.0.71"
thiserror = "1"
anyhow = "1.0.80"
thiserror = "1.0"

# CLI
clap = { version = "4.4.18", features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions atrium-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license.workspace = true
keywords.workspace = true

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
atrium-api.workspace = true
atrium-xrpc-client.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions atrium-cli/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ struct Args {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();
Runner::new(args.pds_host, args.debug)
Ok(Runner::new(args.pds_host, args.debug)
.await?
.run(args.command)
.await;
Ok(())
.await?)
}
Loading

0 comments on commit 6a6acd6

Please sign in to comment.