Skip to content

Commit

Permalink
feat: better error handling on pmonitor config dir
Browse files Browse the repository at this point in the history
  • Loading branch information
conorsch committed Oct 11, 2024
1 parent 05052be commit 785ecdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/bin/pmonitor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ impl Opt {
// FVKs. This can happen an unlimited number of times.
let config_path = opt.home.join("pmonitor_config.toml");
let pmonitor_config: PmonitorConfig =
toml::from_str(&fs::read_to_string(config_path.clone())?)?;
toml::from_str(&fs::read_to_string(config_path.clone()).context(format!(
"failed to load pmonitor config file: {}",
config_path
))?)?;

let mut stake_client = StakeQueryServiceClient::new(
self.pd_channel(pmonitor_config.grpc_url()).await?,
Expand Down

0 comments on commit 785ecdd

Please sign in to comment.