diff options
Diffstat (limited to 'filamento/src/logic/process_stanza.rs')
-rw-r--r-- | filamento/src/logic/process_stanza.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/filamento/src/logic/process_stanza.rs b/filamento/src/logic/process_stanza.rs index 3dfe9fb..94257aa 100644 --- a/filamento/src/logic/process_stanza.rs +++ b/filamento/src/logic/process_stanza.rs @@ -271,7 +271,9 @@ pub async fn recv_iq( if let Err(e) = logic.db().delete_contact(item.jid.clone()).await { - error!("{}", RosterError::Cache(e.into())); + logic + .handle_error(RosterError::Cache(e.into()).into()) + .await; } Ok(Some(UpdateMessage::RosterDelete(item.jid))) } @@ -279,7 +281,9 @@ pub async fn recv_iq( let contact: Contact = item.into(); if let Err(e) = logic.db().upsert_contact(contact.clone()).await { - error!("{}", RosterError::Cache(e.into())); + logic + .handle_error(RosterError::Cache(e.into()).into()) + .await; } let iq = Iq { from: Some(connection.jid().clone()), @@ -293,7 +297,9 @@ pub async fn recv_iq( if let Err(e) = connection.write_handle().write(Stanza::Iq(iq)).await { - error!("could not reply to roster set: {}", e); + logic + .handle_error(RosterError::PushReply(e.into()).into()) + .await; } Ok(Some(UpdateMessage::RosterUpdate(contact))) } |