From b5a74f746d8ec4ce606a4c7f404addf6c4ac7efa Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 1 May 2025 14:57:29 -0400 Subject: [PATCH] proxy: Drop double-wrapping in `RequestInitiationError` See https://github.com/bootc-dev/bootc/issues/1284 - the error text is `ERROR Upgrading: Creating importer: failed to invoke method OpenImage: failed to invoke method OpenImage: lstat ...` This fixes the duplication of `failed to invoke method OpenImage`. I think this was a regression from porting to use thiserror when I was changing the type of each individual function to return our Result type. Signed-off-by: Colin Walters --- src/imageproxy.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/imageproxy.rs b/src/imageproxy.rs index 7239ec5..e9a50eb 100644 --- a/src/imageproxy.rs +++ b/src/imageproxy.rs @@ -446,12 +446,7 @@ impl ImageProxy { let req = Self::impl_request_raw(Arc::clone(&self.sockfd), Request::new(method, args)); let mut childwait = self.childwait.lock().await; tokio::select! { - r = req => { - r.map_err(|e| Error::RequestInitiationFailure { - method: method.to_string().into(), - error: e.to_string().into() - }) - } + r = req => { r } r = childwait.as_mut() => { let r = r.map_err(|e| Error::Other(e.to_string().into()))??; let stderr = String::from_utf8_lossy(&r.stderr);