diff --git a/radicle-cli/src/commands/inbox.rs b/radicle-cli/src/commands/inbox.rs index f313d14f..eaef2ade 100644 --- a/radicle-cli/src/commands/inbox.rs +++ b/radicle-cli/src/commands/inbox.rs @@ -306,9 +306,13 @@ where } = match &n.kind { NotificationKind::Branch { name } => NotificationRow::branch(name, head, &n, &repo)?, NotificationKind::Cob { typed_id } => { - match NotificationRow::cob(typed_id, &n, &issues, &patches, &repo)? { - Some(row) => row, - None => continue, + match NotificationRow::cob(typed_id, &n, &issues, &patches, &repo) { + Ok(Some(row)) => row, + Ok(None) => continue, + Err(e) => { + log::error!(target: "cli", "Error loading notification for {typed_id}: {e}"); + continue; + } } } NotificationKind::Unknown { refname } => { diff --git a/radicle-cli/src/commands/issue.rs b/radicle-cli/src/commands/issue.rs index fc1f8e16..2891b621 100644 --- a/radicle-cli/src/commands/issue.rs +++ b/radicle-cli/src/commands/issue.rs @@ -632,9 +632,13 @@ where let mut all = Vec::new(); let issues = cache.list()?; for result in issues { - let Ok((id, issue)) = result else { - // Skip issues that failed to load. - continue; + let (id, issue) = match result { + Ok((id, issue)) => (id, issue), + Err(e) => { + // Skip issues that failed to load. + log::error!(target: "cli", "Issue load error: {e}"); + continue; + } }; if let Some(a) = assignee { diff --git a/radicle-cli/src/commands/patch/list.rs b/radicle-cli/src/commands/patch/list.rs index 8a89be5c..3edf5c91 100644 --- a/radicle-cli/src/commands/patch/list.rs +++ b/radicle-cli/src/commands/patch/list.rs @@ -29,9 +29,13 @@ pub fn run( None => patches.list()?, }; for patch in iter { - let Ok((id, patch)) = patch else { - // Skip patches that failed to load. - continue; + let (id, patch) = match patch { + Ok((id, patch)) => (id, patch), + Err(e) => { + // Skip patches that failed to load. + log::error!(target: "cli", "Patch load error: {e}"); + continue; + } }; if !authors.is_empty() { if !authors.contains(patch.author().id()) { diff --git a/radicle/src/cob.rs b/radicle/src/cob.rs index 97817664..dd0b4797 100644 --- a/radicle/src/cob.rs +++ b/radicle/src/cob.rs @@ -29,6 +29,12 @@ pub struct TypedId { pub type_name: TypeName, } +impl std::fmt::Display for TypedId { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}/{}", self.type_name, self.id) + } +} + /// Errors that occur when parsing a Git refname into a [`TypedId`]. #[derive(Debug, thiserror::Error)] pub enum ParseIdentifierError {