eyre work

This commit is contained in:
John Smith
2022-07-06 23:15:51 -04:00
parent 2f05611170
commit cd0cd78e30
21 changed files with 345 additions and 229 deletions
+3 -7
View File
@@ -76,7 +76,7 @@ impl ServicesContext {
// Init node id from config now that protected store is set up
if let Err(e) = self.config.init_node_id(protected_store.clone()).await {
self.shutdown().await;
return Err(VeilidAPIError::Internal { message: e });
return Err(e);
}
// Set up tablestore
@@ -177,9 +177,7 @@ impl VeilidCoreContext {
// Set up config from callback
trace!("setup config with callback");
let mut config = VeilidConfig::new();
if let Err(e) = config.setup(config_callback) {
return Err(VeilidAPIError::Internal { message: e });
}
config.setup(config_callback)?;
Self::new_common(update_callback, config).await
}
@@ -192,9 +190,7 @@ impl VeilidCoreContext {
// Set up config from callback
trace!("setup config with json");
let mut config = VeilidConfig::new();
if let Err(e) = config.setup_from_json(config_json) {
return Err(VeilidAPIError::Internal { message: e });
}
config.setup_from_json(config_json)?;
Self::new_common(update_callback, config).await
}