fix: expose runtime worker list endpoint

This commit is contained in:
2026-07-21 18:04:14 +09:00
parent f79892baef
commit 2e2d7b7290
3 changed files with 84 additions and 3 deletions
+12 -1
View File
@@ -22,8 +22,19 @@ pub(crate) async fn run(target: BackendRuntimeListTarget) -> Result<(), Box<dyn
))
})?;
if response.items.is_empty() {
let diagnostics = response
.diagnostics
.iter()
.map(|diagnostic| format!("{}: {}", diagnostic.code, diagnostic.message))
.collect::<Vec<_>>()
.join("; ");
let detail = if diagnostics.is_empty() {
"no backend diagnostics".to_string()
} else {
diagnostics
};
return Err(Box::new(io::Error::other(format!(
"Backend returned no runtime workers for workspace {}",
"Backend returned no runtime workers for workspace {} ({detail})",
response.workspace_id
))));
}