From 3660c2657d8cdfe4f6f65fdf196ce9c837864f96 Mon Sep 17 00:00:00 2001 From: glendc Date: Fri, 8 Nov 2024 19:56:19 +0100 Subject: [PATCH] do not stringify http tcp proxy error --- .../client/proxy/layer/proxy_connector/service.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rama-http-backend/src/client/proxy/layer/proxy_connector/service.rs b/rama-http-backend/src/client/proxy/layer/proxy_connector/service.rs index 61f5442f..854ff371 100644 --- a/rama-http-backend/src/client/proxy/layer/proxy_connector/service.rs +++ b/rama-http-backend/src/client/proxy/layer/proxy_connector/service.rs @@ -122,13 +122,12 @@ where .await .map_err(|err| match address.as_ref() { Some(address) => OpaqueError::from_std(HttpProxyError::Transport( - OpaqueError::from_display(format!( - "establish connection to proxy {} (protocol: {:?}): {}", - address.authority, - address.protocol, - err.into(), - )) - .into_boxed(), + OpaqueError::from_boxed(err.into()) + .context(format!( + "establish connection to proxy {} (protocol: {:?})", + address.authority, address.protocol, + )) + .into_boxed(), )), None => { OpaqueError::from_boxed(err.into()).context("establish connection target")