Skip to content

Commit

Permalink
Graceful handle failed activity (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored Oct 30, 2023
1 parent c6e7576 commit d68321d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mutiny-core/src/nodemanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,19 @@ impl<S: MutinyStorage> NodeManager<S> {
pub async fn get_activity(&self) -> Result<Vec<ActivityItem>, MutinyError> {
// todo add contacts to the activity
let (lightning, closures) =
futures_util::try_join!(self.list_invoices(), self.list_channel_closures())?;
futures_util::join!(self.list_invoices(), self.list_channel_closures());
let lightning = lightning
.map_err(|e| {
log_warn!(self.logger, "Failed to get lightning activity: {e}");
e
})
.unwrap_or_default();
let closures = closures
.map_err(|e| {
log_warn!(self.logger, "Failed to get channel closures: {e}");
e
})
.unwrap_or_default();
let onchain = self
.list_onchain()
.map_err(|e| {
Expand Down

0 comments on commit d68321d

Please sign in to comment.