Skip to content

Commit

Permalink
Make errors public
Browse files Browse the repository at this point in the history
  • Loading branch information
poljar committed May 28, 2024
1 parent 96c5515 commit 05f9f85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/matrix-sdk/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub enum HttpError {

/// An error converting between ruma_*_api types and Hyper types.
#[error(transparent)]
Api(FromHttpResponseError<RumaApiError>),
Api(#[from] FromHttpResponseError<RumaApiError>),

/// An error converting between ruma_client_api types and Hyper types.
#[error(transparent)]
Expand Down
7 changes: 3 additions & 4 deletions crates/matrix-sdk/src/oidc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,12 @@ mod tests;

pub use self::{
auth_code_builder::{OidcAuthCodeUrlBuilder, OidcAuthorizationData},
cross_process::CrossProcessRefreshLockError,
end_session_builder::{OidcEndSessionData, OidcEndSessionUrlBuilder},
};
use self::{
backend::{server::OidcServer, OidcBackend},
cross_process::{
CrossProcessRefreshLockError, CrossProcessRefreshLockGuard, CrossProcessRefreshManager,
},
cross_process::{CrossProcessRefreshLockGuard, CrossProcessRefreshManager},
};
use crate::{
authentication::AuthData, client::SessionChange, Client, HttpError, RefreshTokenError, Result,
Expand Down Expand Up @@ -445,7 +444,7 @@ impl Oidc {
/// # Panics
///
/// Will panic if no OIDC client has been configured yet.
fn set_session_tokens(&self, session_tokens: OidcSessionTokens) {
pub(crate) fn set_session_tokens(&self, session_tokens: OidcSessionTokens) {
let data =
self.data().expect("Cannot call OpenID Connect API after logging in with another API");
if let Some(tokens) = data.tokens.get() {
Expand Down

0 comments on commit 05f9f85

Please sign in to comment.