aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-auth/src')
-rwxr-xr-xazalea-auth/src/sessionserver.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/azalea-auth/src/sessionserver.rs b/azalea-auth/src/sessionserver.rs
index fe0b694a..800a9642 100755
--- a/azalea-auth/src/sessionserver.rs
+++ b/azalea-auth/src/sessionserver.rs
@@ -13,6 +13,10 @@ pub enum SessionServerError {
MultiplayerDisabled,
#[error("This account has been banned from multiplayer")]
Banned,
+ #[error("The authentication servers are currently not reachable")]
+ AuthServersUnreachable,
+ #[error("Invalid or expired session")]
+ InvalidSession,
#[error("Unknown sessionserver error: {0}")]
Unknown(String),
#[error("Unexpected response from sessionserver (status code {status_code}): {body}")]
@@ -64,6 +68,10 @@ pub async fn join(
match forbidden.error.as_str() {
"InsufficientPrivilegesException" => Err(SessionServerError::MultiplayerDisabled),
"UserBannedException" => Err(SessionServerError::Banned),
+ "AuthenticationUnavailableException" => {
+ Err(SessionServerError::AuthServersUnreachable)
+ }
+ "InvalidCredentialsException" => Err(SessionServerError::InvalidSession),
_ => Err(SessionServerError::Unknown(forbidden.error)),
}
}