Skip to content

Commit

Permalink
sdk: slightly better doc for HttpError
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Jun 17, 2024
1 parent c656ad4 commit 72adaf4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/matrix-sdk/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,24 @@ impl RumaApiError {
/// converting the raw HTTP response into a Matrix response.
#[derive(Error, Debug)]
pub enum HttpError {
/// An error at the HTTP layer.
/// Error at the HTTP layer.
#[error(transparent)]
Reqwest(#[from] ReqwestError),

/// Queried endpoint is not meant for clients.
#[error("the queried endpoint is not meant for clients")]
NotClientRequest,

/// An error converting between ruma_*_api types and Hyper types.
/// API response error (deserialization, or a Matrix-specific error).
#[error(transparent)]
Api(#[from] FromHttpResponseError<RumaApiError>),

/// An error converting between ruma_client_api types and Hyper types.
/// Error when creating an API request (e.g. serialization of
/// body/headers/query parameters).
#[error(transparent)]
IntoHttp(IntoHttpError),

/// An error occurred while refreshing the access token.
/// Error while refreshing the access token.
#[error(transparent)]
RefreshToken(RefreshTokenError),
}
Expand Down

0 comments on commit 72adaf4

Please sign in to comment.