From a6c42a8631802b0e4287b231941b63042b991f84 Mon Sep 17 00:00:00 2001 From: piquel Date: Sun, 22 Nov 2026 13:02:56 +0100 Subject: [PATCH] refactor(auth): a page's malformed query is rejected through OAuthError::malformed --- apps/auth-service/src/web/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/auth-service/src/web/mod.rs b/apps/auth-service/src/web/mod.rs index 5ed06d77e..209ee2b6d 100644 --- a/apps/auth-service/src/web/mod.rs +++ b/apps/auth-service/src/web/mod.rs @@ -371,10 +371,7 @@ impl WebApplication { /// The page's query, as `T`. A malformed one is the request's fault. fn query(cx: &Cx) -> std::result::Result { - parse_query_params(cx).map_err(|error| { - OAuthCode::InvalidRequest - .reject_with(format!("the request is malformed: {error}"), error) - }) + parse_query_params(cx).map_err(|error| OAuthError::malformed("the request", error)) } /// The form posted to the page, as `T`. A malformed one is the request's fault.