(&self, sandbox: &Sandbox)
| 499 | // gRPC API surface; boxing here would diverge from every other handler. |
| 500 | #[allow(clippy::result_large_err)] |
| 501 | pub fn validate_sandbox(&self, sandbox: &Sandbox) -> Result<(), Status> { |
| 502 | validate_vm_sandbox(sandbox, self.config.gpu_enabled)?; |
| 503 | if self.resolved_sandbox_image(sandbox).is_none() { |
| 504 | return Err(Status::failed_precondition( |
| 505 | "vm sandboxes require template.image or a configured default sandbox image", |
| 506 | )); |
| 507 | } |
| 508 | Ok(()) |
| 509 | } |
| 510 | |
| 511 | // `tonic::Status` is large but is the standard error type across the |
| 512 | // gRPC API surface; boxing here would diverge from every other handler. |
no test coverage detected