Enum matrix_sdk::Error
source · [−]#[non_exhaustive]
pub enum Error {
Show 17 variants
Http(HttpError),
AuthenticationRequired,
BadCryptoStoreState,
NoOlmMachine,
SerdeJson(JsonError),
Io(IoError),
CryptoStoreError(CryptoStoreError),
OlmError(OlmError),
MegolmError(MegolmError),
DecryptorError(DecryptorError),
StateStore(StoreError),
Identifier(IdParseError),
Url(UrlParseError),
QrCodeScanError(ScanError),
UserTagName(InvalidUserTagName),
ImageError(ImageError),
UnknownError(Box<dyn Error + Send + Sync>),
}
Expand description
Internal representation of errors.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Http(HttpError)
Error doing an HTTP request.
AuthenticationRequired
Queried endpoint requires authentication but was called on an anonymous client.
BadCryptoStoreState
e2e-encryption
only.Attempting to restore a session after the olm-machine has already been set up fails
NoOlmMachine
e2e-encryption
only.Attempting to access the olm-machine but it is not yet available.
SerdeJson(JsonError)
An error de/serializing type for the StateStore
Io(IoError)
An IO error happened.
CryptoStoreError(CryptoStoreError)
e2e-encryption
only.An error occurred in the crypto store.
OlmError(OlmError)
e2e-encryption
only.An error occurred during a E2EE operation.
MegolmError(MegolmError)
e2e-encryption
only.An error occurred during a E2EE group operation.
DecryptorError(DecryptorError)
e2e-encryption
only.An error occurred during decryption.
StateStore(StoreError)
An error occurred in the state store.
Identifier(IdParseError)
An error encountered when trying to parse an identifier.
Url(UrlParseError)
An error encountered when trying to parse a url.
QrCodeScanError(ScanError)
qrcode
only.An error while scanning a QR code.
UserTagName(InvalidUserTagName)
An error encountered when trying to parse a user tag name.
ImageError(ImageError)
image-proc
only.An error while processing images.
UnknownError(Box<dyn Error + Send + Sync>)
An other error was raised this might happen because encryption was enabled on the base-crate but not here and that raised.
Implementations
sourceimpl Error
impl Error
sourcepub fn uiaa_response(&self) -> Option<&UiaaInfo>
pub fn uiaa_response(&self) -> Option<&UiaaInfo>
Try to destructure the error into an universal interactive auth info.
Some requests require universal interactive auth, doing such a request will always fail the first time with a 401 status code, the response body will contain info how the client can authenticate.
The request will need to be retried, this time containing additional authentication data.
This method is an convenience method to get to the info the server returned on the first, failed request.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for Error
impl From<Error> for Error
sourcefn from(e: SdkBaseError) -> Self
fn from(e: SdkBaseError) -> Self
Converts to this type from the input type.
sourceimpl From<Error> for Error
impl From<Error> for Error
sourcefn from(e: ReqwestError) -> Self
fn from(e: ReqwestError) -> Self
Converts to this type from the input type.
sourceimpl From<Error> for RequestVerificationError
impl From<Error> for RequestVerificationError
sourceimpl From<ImageError> for Error
impl From<ImageError> for Error
sourcefn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseError> for Error
impl From<ParseError> for Error
sourcefn from(source: UrlParseError) -> Self
fn from(source: UrlParseError) -> Self
Converts to this type from the input type.
sourceimpl From<StoreError> for Error
impl From<StoreError> for Error
sourcefn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more