fix(tui): abort launch on auth failure, add auth error variant

This commit is contained in:
objz committed 2025-12-27 16:05:33 +01:00
1 parent 14fd9d1ebc
commit 60385e7916
3 files changed
+12 -13

No files matched your search

+5 -1
View File
@@ -14,6 +14,8 @@ pub enum LaunchError {
Json(#[from] serde_json::Error),
#[error("{0} launch is not yet supported")]
NotSupported(String),
#[error("{0}")]
Auth(String),
}
#[derive(serde::Deserialize)]
@@ -243,7 +245,9 @@ pub async fn launch(
Ok(t) => t,
Err(e) => {
tracing::error!("Token refresh failed: {e}");
"0".to_string()
return Err(LaunchError::Auth(format!(
"Authentication failed: {e}"
)));
}
}
}