Rename HttpError::{FromHttpResponse => ClientApi}
parent
efe5b1e538
commit
68b74c5ea9
|
@ -2697,13 +2697,13 @@ mod test {
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
if let Err(err) = client.login("example", "wordpass", None, None).await {
|
if let Err(err) = client.login("example", "wordpass", None, None).await {
|
||||||
if let crate::Error::Http(HttpError::FromHttpResponse(
|
if let crate::Error::Http(HttpError::ClientApi(crate::FromHttpResponseError::Http(
|
||||||
crate::FromHttpResponseError::Http(crate::ServerError::Known(crate::api::Error {
|
crate::ServerError::Known(crate::api::Error {
|
||||||
kind,
|
kind,
|
||||||
message,
|
message,
|
||||||
status_code,
|
status_code,
|
||||||
})),
|
}),
|
||||||
)) = err
|
))) = err
|
||||||
{
|
{
|
||||||
if let crate::api::error::ErrorKind::Forbidden = kind {
|
if let crate::api::error::ErrorKind::Forbidden = kind {
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -57,7 +57,7 @@ pub enum HttpError {
|
||||||
|
|
||||||
/// An error converting between ruma_client_api types and Hyper types.
|
/// An error converting between ruma_client_api types and Hyper types.
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
FromHttpResponse(#[from] FromHttpResponseError<RumaClientError>),
|
ClientApi(#[from] FromHttpResponseError<RumaClientError>),
|
||||||
|
|
||||||
/// An error converting between ruma_client_api types and Hyper types.
|
/// An error converting between ruma_client_api types and Hyper types.
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
|
|
Loading…
Reference in New Issue