fix(tui): abort launch on auth failure, add auth error variant
This commit is contained in:
1 parent
14fd9d1ebc
commit
60385e7916
3 files changed
+12
-13
No files matched your search
@@ -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}"
|
||||
)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user