aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--filamento/src/error.rs4
-rw-r--r--filamento/src/logic/process_stanza.rs8
2 files changed, 3 insertions, 9 deletions
diff --git a/filamento/src/error.rs b/filamento/src/error.rs
index 9334793..af3320f 100644
--- a/filamento/src/error.rs
+++ b/filamento/src/error.rs
@@ -330,8 +330,8 @@ pub enum PresenceError {
Unsupported,
#[error("missing from")]
MissingFrom,
- #[error("stanza error: {0}")]
- StanzaError(#[from] stanza::client::error::Error),
+ #[error("stanza error: {0:?}")]
+ StanzaError(Option<stanza::client::error::Error>),
}
#[derive(Debug, Error, Clone)]
diff --git a/filamento/src/logic/process_stanza.rs b/filamento/src/logic/process_stanza.rs
index 3bc4b8c..30d0830 100644
--- a/filamento/src/logic/process_stanza.rs
+++ b/filamento/src/logic/process_stanza.rs
@@ -479,13 +479,7 @@ pub async fn recv_presence(
stanza::client::presence::PresenceType::Error => {
// TODO: is there any other information that should go with the error? also MUST have an error, otherwise it's a different error. maybe it shoulnd't be an option.
// TODO: ughhhhhhhhhhhhh these stanza errors should probably just have an option, and custom display
- Err(PresenceError::StanzaError(
- presence
- .errors
- .first()
- .cloned()
- .expect("error MUST have error"),
- ))
+ Err(PresenceError::StanzaError(presence.errors.first().cloned()))
}
// should not happen (error to server)
stanza::client::presence::PresenceType::Probe => {