As of PR #893, all feature-domain APIs return a typed, domain-specific error instead of anyhow::Error. Use ? to propagate errors into any anyhow context — all types implement std::error::Error and are #[non_exhaustive], so your existing error-handling code compiles unchanged. Lower-level APIs such as Client::connect and media upload/download are not covered by this page and may still surface anyhow::Error directly.
Error hierarchy
Domain errors that embed IqError or ClientError via #[from] propagate those failures automatically via ?. Some errors (e.g. AppStateError, SignalError) use internal anyhow::Error wrapping instead and do not have Iq or Client variants.
Domain error types
Type definitions
SendError
GroupError
BlockingError
AppStateError
Shared by ChatActions and Labels.
ChatStateError
NewsletterError
PollError
ProfileError
SignalError
TcTokenError
PresenceError
ClientError (base type)
IqError (base type)
IqError::ClientState holds a Box<ClientError> (not ClientError directly) to break the mutual-size cycle between ClientError and IqError. Pattern matching needs dereferencing: IqError::ClientState(e) => { /* *e is a ClientError */ }.
Migration guide
From anyhow::Error
If your handler used ? into anyhow:
If you were matching on anyhow::Error downcasts, switch to typed matching:
IqError::ClientState boxing