improve err message

This commit is contained in:
Ruben Fiszel
2025-05-22 19:48:26 +02:00
parent 8269230628
commit d7d67f3e62
+2 -5
View File
@@ -462,15 +462,12 @@ async fn handle_docker_job(
if result.is_some_and(|x| x > 0) {
return Err(Error::ExecutionErr(format!(
"Docker exit status: {}",
"Docker job completed with unsuccessful exit status: {}",
result.unwrap()
)));
}
return Ok(to_raw_value(&json!(format!(
"Docker exit status: {}",
result
.map(|x| x.to_string())
.unwrap_or_else(|| "none".to_string())
"Docker job completed with success exit status"
))));
}