fix(macos): support bundled CLI through Homebrew and report auth failures

This commit is contained in:
Kevin Yue committed 2026-10-10 16:37:28 +08:00
1 parent 8724ed3b37
commit 29e8d9c822
10 files changed
+165 -22

No files matched your search

+1 -4
View File
@@ -130,10 +130,7 @@ impl SamlAuthData {
Ok(auth_data)
}
Some(status) => Err(AuthDataParseError::Invalid(anyhow::anyhow!(
"SAML auth status: {}",
status
))),
Some(status) => Err(AuthDataParseError::AuthenticationFailed(status)),
None => Err(AuthDataParseError::NotFound),
}
}
+6 -1
View File
@@ -29,12 +29,17 @@ impl PortalError {
pub enum AuthDataParseError {
#[error("No auth data found")]
NotFound,
#[error("Authentication failed (SAML status: {0})")]
AuthenticationFailed(String),
#[error(transparent)]
Invalid(#[from] anyhow::Error),
}
impl AuthDataParseError {
pub fn is_invalid(&self) -> bool {
matches!(self, AuthDataParseError::Invalid(_))
matches!(
self,
AuthDataParseError::Invalid(_) | AuthDataParseError::AuthenticationFailed(_)
)
}
}