diff --git a/matrix_sdk/src/error.rs b/matrix_sdk/src/error.rs index 568baeb8..abdb89f8 100644 --- a/matrix_sdk/src/error.rs +++ b/matrix_sdk/src/error.rs @@ -19,10 +19,10 @@ use matrix_sdk_base::{Error as MatrixError, StoreError}; use matrix_sdk_common::{ api::{ r0::uiaa::{UiaaInfo, UiaaResponse as UiaaError}, - Error as RumaClientError, + Error as RumaClientApiError, }, identifiers::Error as IdentifierError, - FromHttpResponseError, IntoHttpError, ServerError, + FromHttpResponseError, IntoHttpError, MatrixError as RumaApiError, ServerError, }; use reqwest::Error as ReqwestError; use serde_json::Error as JsonError; @@ -55,9 +55,13 @@ pub enum HttpError { #[error("the queried endpoint is not meant for clients")] NotClientRequest, + /// An error converting between ruma_*_api types and Hyper types. + #[error(transparent)] + Api(#[from] FromHttpResponseError), + /// An error converting between ruma_client_api types and Hyper types. #[error(transparent)] - ClientApi(#[from] FromHttpResponseError), + ClientApi(#[from] FromHttpResponseError), /// An error converting between ruma_client_api types and Hyper types. #[error(transparent)] diff --git a/matrix_sdk_common/src/lib.rs b/matrix_sdk_common/src/lib.rs index fd0e43d9..43c1ba68 100644 --- a/matrix_sdk_common/src/lib.rs +++ b/matrix_sdk_common/src/lib.rs @@ -3,7 +3,9 @@ pub use instant; pub use ruma::{ api::{ client as api, - error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError}, + error::{ + FromHttpRequestError, FromHttpResponseError, IntoHttpError, MatrixError, ServerError, + }, AuthScheme, EndpointError, IncomingResponse, OutgoingRequest, SendAccessToken, }, assign, directory, encryption, events, identifiers, int, presence, push,