aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'filamento/src/error.rs')
-rw-r--r--filamento/src/error.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/filamento/src/error.rs b/filamento/src/error.rs
index 23272b1..76509f6 100644
--- a/filamento/src/error.rs
+++ b/filamento/src/error.rs
@@ -3,7 +3,7 @@ use std::{num::TryFromIntError, string::FromUtf8Error, sync::Arc};
use base64::DecodeError;
use image::ImageError;
use jid::JID;
-use lampada::error::{ConnectionError, ReadError, WriteError};
+use lampada::error::{ActorError, ConnectionError, ReadError, WriteError};
use stanza::client::{Stanza, iq::Query};
use thiserror::Error;
@@ -117,6 +117,17 @@ pub enum RosterError {
StanzaError(#[from] stanza::client::error::Error),
#[error("could not reply to roster push: {0}")]
PushReply(WriteError),
+ #[error("actor error: {0}")]
+ Actor(ActorError),
+}
+
+impl From<CommandError<RosterError>> for RosterError {
+ fn from(value: CommandError<RosterError>) -> Self {
+ match value {
+ CommandError::Actor(actor_error) => Self::Actor(actor_error),
+ CommandError::Error(e) => e,
+ }
+ }
}
#[derive(Debug, Error, Clone)]