Skip to content

Commit

Permalink
error logs in add ivs
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay111meher committed Nov 8, 2024
1 parent 4ea3b19 commit 5afd851
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions kalypso-cli/src/operations/update_encryption_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn Error>
})?;

if !response.status().is_success() {
return Err(format!("Error: {}", response.status()).into());
Expand Down Expand Up @@ -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<dyn Error>
})?;

if !response.status().is_success() {
return Err(format!("Error: {}", response.status()).into());
Expand Down

0 comments on commit 5afd851

Please sign in to comment.