diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index a6d9b651..3c2d61ce 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -2697,13 +2697,13 @@ mod test { .create(); if let Err(err) = client.login("example", "wordpass", None, None).await { - if let crate::Error::Http(HttpError::FromHttpResponse( - crate::FromHttpResponseError::Http(crate::ServerError::Known(crate::api::Error { + if let crate::Error::Http(HttpError::ClientApi(crate::FromHttpResponseError::Http( + crate::ServerError::Known(crate::api::Error { kind, message, status_code, - })), - )) = err + }), + ))) = err { if let crate::api::error::ErrorKind::Forbidden = kind { } else { diff --git a/matrix_sdk/src/error.rs b/matrix_sdk/src/error.rs index 3fd66c24..568baeb8 100644 --- a/matrix_sdk/src/error.rs +++ b/matrix_sdk/src/error.rs @@ -57,7 +57,7 @@ pub enum HttpError { /// An error converting between ruma_client_api types and Hyper types. #[error(transparent)] - FromHttpResponse(#[from] FromHttpResponseError), + ClientApi(#[from] FromHttpResponseError), /// An error converting between ruma_client_api types and Hyper types. #[error(transparent)]