From c1eeabc07c386afde1c4d555095812f5c2bdf47a Mon Sep 17 00:00:00 2001 From: 0xf8 <0xf8.dev@proton.me> Date: Wed, 21 Jun 2023 16:52:39 -0400 Subject: [PATCH] Improve error messages in join.rs --- src/server/session/join.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/session/join.rs b/src/server/session/join.rs index b208cf0..a5e1c06 100644 --- a/src/server/session/join.rs +++ b/src/server/session/join.rs @@ -45,12 +45,12 @@ pub async fn join(mut req: Request) -> Result { let Some(profile) = token.account.selected_profile.to_owned() else { // No selected profile - return Err(YggdrasilError::new_unauthorized("Invalid token.").into()) + return Err(YggdrasilError::new_base("Account has no profile.").into()) }; if body.profile_uuid != profile.uuid { // UUID doesn't match - return Err(YggdrasilError::new_unauthorized("Invalid token.").into()) + return Err(YggdrasilError::new_base("UUID doesn't match.").into()) } Session::create(req.state(), &profile, body.server_id, req.remote().unwrap().to_string()).await?;