pub enum ClientError {
Show 27 variants
AddressValidation(IdentifierValidationError),
PublishError(String),
Storage(StorageError),
Api(ApiError),
Identity(IdentityError),
TlsError(Error),
KeyPackageVerification(KeyPackageVerificationError),
StreamInconsistency(String),
Association(AssociationError),
SignatureValidation(SignatureError),
IdentityUpdate(IdentityUpdateError),
SignatureRequest(SignatureRequestError),
Group(Box<GroupError>),
LocalEvent(LocalEventError),
Db(ConnectionError),
Generic(String),
MlsStore(MlsStoreError),
EnrichMessage(EnrichMessageError),
Conversion(ConversionError),
RegistrationNotVisible,
AlreadyClosed,
ConfigurationUnavailable(Box<ConfigurationFetchError>),
ConfigurationInvalid(ServerConfigurationError),
BackendMismatch {
stored: String,
received: String,
},
ClientVersionTooOld {
client: String,
minimum: String,
},
AuthRequired {
required_scopes: Vec<String>,
},
ChainNotAccepted {
chain: String,
accepted: Vec<String>,
},
}Variants§
AddressValidation(IdentifierValidationError)
PublishError(String)
Could not publish.
Failed to publish messages to the network. May be retryable.
Storage(StorageError)
Storage error.
Database operation failed. May be retryable.
Api(ApiError)
API error.
Network request to XMTP backend failed. Retryable.
Identity(IdentityError)
Identity error.
Problem with identity operations. Not retryable.
TlsError(Error)
TLS Codec error.
Encoding/decoding MLS TLS structures failed. Not retryable.
KeyPackageVerification(KeyPackageVerificationError)
Key package verification failed.
Invalid key package received from network. Not retryable.
StreamInconsistency(String)
Stream inconsistency.
Message stream state became inconsistent. Not retryable.
Association(AssociationError)
Association error.
Identity association operation failed. Not retryable.
SignatureValidation(SignatureError)
Signature validation error.
A signature failed verification. Not retryable.
IdentityUpdate(IdentityUpdateError)
Identity update error.
Failed to process identity update. Not retryable.
SignatureRequest(SignatureRequestError)
Signature request error.
Failed to create/process signature request. Not retryable.
Group(Box<GroupError>)
Group error.
Group operation failed. May be retryable.
LocalEvent(LocalEventError)
Local event error.
Failed to process local event. Not retryable.
Db(ConnectionError)
Database connection error.
Connection to database failed. Retryable.
Generic(String)
Generic error.
Unclassified error. May be retryable.
MlsStore(MlsStoreError)
MLS store error.
OpenMLS key store operation failed. Not retryable.
EnrichMessage(EnrichMessageError)
Message enrichment error.
Failed to enrich message content. Not retryable.
Conversion(ConversionError)
Conversion Error
Data type failed to convert. Not retryable.
RegistrationNotVisible
Registration not visible.
Registration has no publish cursor or is not visible before the timeout. Not retryable.
AlreadyClosed
Client is closed.
Operation was attempted on a client that has been shut down via
Client::close. Not retryable — build a new client instead.
Server configuration unavailable.
The backend did not serve its configuration, or the answer could not be
stored. A backend older than spec 006 answers UNIMPLEMENTED; there is
no compatibility shim. Retryable exactly when the wrapped failure is:
an unreachable backend is worth another attempt, UNIMPLEMENTED is not.
ConfigurationInvalid(ServerConfigurationError)
Server configuration invalid.
The backend published a configuration this client cannot use: a missing or malformed identifier, a minimum version that does not parse, or a chain that is not a CAIP-2 identifier. Not retryable.
BackendMismatch
Backend mismatch.
This database is bound to one backend deployment and a different one answered. Not retryable — use a database created for the backend this app now points at.
ClientVersionTooOld
Client version too old.
The backend requires a newer libxmtp than this build. Not retryable — ship an updated client.
AuthRequired
Authentication required.
The backend requires a credential and none was configured. Not retryable — supply an auth callback or handle before building.
ChainNotAccepted
Chain not accepted.
The backend does not verify smart contract wallet signatures on this chain. Not retryable — use a chain the deployment accepts.
Implementations§
Source§impl ClientError
impl ClientError
pub fn db_needs_connection(&self) -> bool
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl ErrorCode for ClientError
impl ErrorCode for ClientError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Source§impl From<&ConfigurationLatch> for ClientError
impl From<&ConfigurationLatch> for ClientError
Source§fn from(latch: &ConfigurationLatch) -> Self
fn from(latch: &ConfigurationLatch) -> Self
Source§impl From<&str> for ClientError
impl From<&str> for ClientError
Source§impl From<ApiError> for ClientError
impl From<ApiError> for ClientError
Source§impl From<AssociationError> for ClientError
impl From<AssociationError> for ClientError
Source§fn from(source: AssociationError) -> Self
fn from(source: AssociationError) -> Self
Source§impl From<ClientError> for ClientBuilderError
impl From<ClientError> for ClientBuilderError
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Source§impl From<ClientError> for DeviceSyncError
impl From<ClientError> for DeviceSyncError
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Source§impl From<ClientError> for GroupError
impl From<ClientError> for GroupError
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Source§impl From<ClientError> for IdentityDependencyError
impl From<ClientError> for IdentityDependencyError
Source§fn from(error: ClientError) -> Self
fn from(error: ClientError) -> Self
Source§impl From<ClientError> for InstallationDiffError
impl From<ClientError> for InstallationDiffError
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Source§impl From<ConnectionError> for ClientError
impl From<ConnectionError> for ClientError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConversionError> for ClientError
impl From<ConversionError> for ClientError
Source§fn from(source: ConversionError) -> Self
fn from(source: ConversionError) -> Self
Source§impl From<EnrichMessageError> for ClientError
impl From<EnrichMessageError> for ClientError
Source§fn from(source: EnrichMessageError) -> Self
fn from(source: EnrichMessageError) -> Self
Source§impl From<Error> for ClientError
impl From<Error> for ClientError
Source§impl From<GroupError> for ClientError
impl From<GroupError> for ClientError
Source§fn from(err: GroupError) -> ClientError
fn from(err: GroupError) -> ClientError
Source§impl From<IdentifierValidationError> for ClientError
impl From<IdentifierValidationError> for ClientError
Source§fn from(source: IdentifierValidationError) -> Self
fn from(source: IdentifierValidationError) -> Self
Source§impl From<IdentityError> for ClientError
impl From<IdentityError> for ClientError
Source§fn from(source: IdentityError) -> Self
fn from(source: IdentityError) -> Self
Source§impl From<IdentityUpdateError> for ClientError
impl From<IdentityUpdateError> for ClientError
Source§fn from(source: IdentityUpdateError) -> Self
fn from(source: IdentityUpdateError) -> Self
Source§impl From<KeyPackageVerificationError> for ClientError
impl From<KeyPackageVerificationError> for ClientError
Source§fn from(source: KeyPackageVerificationError) -> Self
fn from(source: KeyPackageVerificationError) -> Self
Source§impl From<LocalEventError> for ClientError
impl From<LocalEventError> for ClientError
Source§fn from(source: LocalEventError) -> Self
fn from(source: LocalEventError) -> Self
Source§impl From<MlsStoreError> for ClientError
impl From<MlsStoreError> for ClientError
Source§fn from(source: MlsStoreError) -> Self
fn from(source: MlsStoreError) -> Self
Source§impl From<NotFound> for ClientError
impl From<NotFound> for ClientError
Source§impl From<ServerConfigurationError> for ClientError
impl From<ServerConfigurationError> for ClientError
Source§fn from(source: ServerConfigurationError) -> Self
fn from(source: ServerConfigurationError) -> Self
Source§impl From<SignatureError> for ClientError
impl From<SignatureError> for ClientError
Source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Source§impl From<SignatureRequestError> for ClientError
impl From<SignatureRequestError> for ClientError
Source§fn from(source: SignatureRequestError) -> Self
fn from(source: SignatureRequestError) -> Self
Source§impl From<StorageError> for ClientError
impl From<StorageError> for ClientError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Source§impl From<String> for ClientError
impl From<String> for ClientError
Source§impl RetryableError for ClientError
impl RetryableError for ClientError
fn is_retryable(&self) -> bool
Auto Trait Implementations§
impl Freeze for ClientError
impl !RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl !UnwindSafe for ClientError
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more