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)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
sourceimpl From<CryptoStoreError> for Error
impl From<CryptoStoreError> for Error
sourcefn from(source: CryptoStoreError) -> Self
fn from(source: CryptoStoreError) -> Self
sourceimpl From<DecryptorError> for Error
impl From<DecryptorError> for Error
sourcefn from(source: DecryptorError) -> Self
fn from(source: DecryptorError) -> Self
sourceimpl From<Error> for Error
impl From<Error> for Error
sourcefn from(e: SdkBaseError) -> Self
fn from(e: SdkBaseError) -> Self
sourceimpl From<Error> for Error
impl From<Error> for Error
sourcefn from(e: ReqwestError) -> Self
fn from(e: ReqwestError) -> Self
sourceimpl From<Error> for RequestVerificationError
Available on crate feature e2e-encryption
only.
impl From<Error> for RequestVerificationError
e2e-encryption
only.