Translate deserialisation error as 400 (#27)

Also fixes a Clippy warning
This commit is contained in:
Simon Bihel
2022-04-19 13:46:16 +01:00
committed by GitHub
parent 2e54c4446a
commit b172f31d40
2 changed files with 13 additions and 3 deletions

View File

@@ -227,7 +227,7 @@ async fn client_update(
bearer: Option<TypedHeader<Authorization<Bearer>>>,
Extension(redis_client): Extension<RedisClient>,
) -> Result<(), CustomError> {
Ok(oidc::client_update(client_id, payload, bearer.map(|b| b.0 .0), &redis_client).await?)
oidc::client_update(client_id, payload, bearer.map(|b| b.0 .0), &redis_client).await
}
async fn client_delete(