From b7d5d800770f1233813e06db7760facaa4d0a643 Mon Sep 17 00:00:00 2001 From: Eraxyso <130852025+Eraxyso@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:43:46 +0000 Subject: [PATCH] fix: change the wrong statuscode --- src/handler/users.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handler/users.rs b/src/handler/users.rs index e4fd7f0..212ceb2 100644 --- a/src/handler/users.rs +++ b/src/handler/users.rs @@ -47,7 +47,7 @@ pub async fn put_me_email( let email = body .email .parse::
() - .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + .map_err(|_| StatusCode::BAD_REQUEST)?; let jwt = state .encode_email_update_jwt(user_id, &body.email)