You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
storage: unify most oauth2 related errors
This commit is contained in:
@@ -27,7 +27,6 @@ use async_graphql::{
|
||||
Context, Description, EmptyMutation, EmptySubscription, ID,
|
||||
};
|
||||
use mas_axum_utils::SessionInfo;
|
||||
use mas_storage::LookupResultExt;
|
||||
use sqlx::PgPool;
|
||||
|
||||
use self::model::{
|
||||
@@ -96,9 +95,7 @@ impl RootQuery {
|
||||
let database = ctx.data::<PgPool>()?;
|
||||
let mut conn = database.acquire().await?;
|
||||
|
||||
let client = mas_storage::oauth2::client::lookup_client(&mut conn, id)
|
||||
.await
|
||||
.to_option()?;
|
||||
let client = mas_storage::oauth2::client::lookup_client(&mut conn, id).await?;
|
||||
|
||||
Ok(client.map(OAuth2Client))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user