Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit d68321d

Browse files
authored
Graceful handle failed activity (#811)
1 parent c6e7576 commit d68321d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

mutiny-core/src/nodemanager.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,19 @@ impl<S: MutinyStorage> NodeManager<S> {
12311231
pub async fn get_activity(&self) -> Result<Vec<ActivityItem>, MutinyError> {
12321232
// todo add contacts to the activity
12331233
let (lightning, closures) =
1234-
futures_util::try_join!(self.list_invoices(), self.list_channel_closures())?;
1234+
futures_util::join!(self.list_invoices(), self.list_channel_closures());
1235+
let lightning = lightning
1236+
.map_err(|e| {
1237+
log_warn!(self.logger, "Failed to get lightning activity: {e}");
1238+
e
1239+
})
1240+
.unwrap_or_default();
1241+
let closures = closures
1242+
.map_err(|e| {
1243+
log_warn!(self.logger, "Failed to get channel closures: {e}");
1244+
e
1245+
})
1246+
.unwrap_or_default();
12351247
let onchain = self
12361248
.list_onchain()
12371249
.map_err(|e| {

0 commit comments

Comments
 (0)