runtime: preserve typed workdir errors

This commit is contained in:
2026-07-13 20:17:09 +09:00
parent 72c7beb9c7
commit da0fe7c81f
7 changed files with 123 additions and 30 deletions
+3 -3
View File
@@ -233,7 +233,7 @@ impl Runtime {
};
backend
.create_working_directory(&request)
.map_err(|diagnostic| RuntimeError::InvalidRequest(diagnostic.to_string()))
.map_err(RuntimeError::from)
}
/// List Runtime-owned working directories through the attached execution backend.
@@ -269,7 +269,7 @@ impl Runtime {
};
let status = backend
.working_directory(working_directory_id)
.map_err(|diagnostic| RuntimeError::InvalidRequest(diagnostic.to_string()))?;
.map_err(RuntimeError::from)?;
self.annotate_working_directory_status(status)
}
@@ -294,7 +294,7 @@ impl Runtime {
};
backend
.cleanup_working_directory(working_directory_id)
.map_err(|diagnostic| RuntimeError::InvalidRequest(diagnostic.to_string()))
.map_err(RuntimeError::from)
}
fn annotate_working_directory_statuses(