diff --git a/src/qos_net/src/error.rs b/src/qos_net/src/error.rs index b7bbc266..ec2326b0 100644 --- a/src/qos_net/src/error.rs +++ b/src/qos_net/src/error.rs @@ -65,6 +65,6 @@ impl From for QosNetError { impl From for QosNetError { fn from(err: ResolveError) -> Self { let msg = format!("{err:?}"); - Self::ParseError(msg) + Self::DNSResolutionError(msg) } } diff --git a/src/qos_net/src/proxy_connection.rs b/src/qos_net/src/proxy_connection.rs index 3c70a88b..ef6b390e 100644 --- a/src/qos_net/src/proxy_connection.rs +++ b/src/qos_net/src/proxy_connection.rs @@ -114,7 +114,10 @@ fn resolve_hostname( ); let resolver = Resolver::new(resolver_config, ResolverOpts::default())?; println!("resolver ready"); - let response = resolver.lookup_ip(hostname.clone())?; + let response = resolver.lookup_ip(hostname.clone()).map_err(|e| { + println!("error invoking resolver: {:?}", e); + QosNetError::from(e) + })?; println!("resolver successfully invoked"); response.iter().next().ok_or_else(|| { QosNetError::DNSResolutionError(format!(