From 5afd85138046ab0290065eea8009b6f7aa6d8817 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 8 Nov 2024 20:28:12 +0000 Subject: [PATCH] error logs in add ivs --- .../src/operations/update_encryption_key.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/kalypso-cli/src/operations/update_encryption_key.rs b/kalypso-cli/src/operations/update_encryption_key.rs index f9807c0..7574d9e 100644 --- a/kalypso-cli/src/operations/update_encryption_key.rs +++ b/kalypso-cli/src/operations/update_encryption_key.rs @@ -181,7 +181,13 @@ pub async fn get_address_signature( .headers(headers) .json(&payload) .send() - .await?; + .await + .map_err(|e| { + Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + format!("Failed to send request: {}", e), + )) as Box + })?; if !response.status().is_success() { return Err(format!("Error: {}", response.status()).into()); @@ -235,7 +241,13 @@ pub async fn get_attestation_signature( .headers(headers) .json(&payload) .send() - .await?; + .await + .map_err(|e| { + Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + format!("Failed to send request: {}", e), + )) as Box + })?; if !response.status().is_success() { return Err(format!("Error: {}", response.status()).into());