diff --git a/src/handler/authentication.rs b/src/handler/authentication.rs index 5210f85..fbb50b7 100644 --- a/src/handler/authentication.rs +++ b/src/handler/authentication.rs @@ -69,7 +69,7 @@ pub async fn sign_up( let email = state .get_email_by_email_jwt(&body.token) .await - .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + .map_err(|_| StatusCode::UNAUTHORIZED)?; let id = state .create_user_by_email(&body.user_name, &email) .await