Skip to content

Commit

Permalink
add output that could not be parsed to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfraem committed Nov 28, 2024
1 parent 8ddb9af commit 460b8f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions identity_iota_core/tests/e2e/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async fn publish_package(active_address: IotaAddress) -> anyhow::Result<ObjectID

let publish_result = {
let output_str = std::str::from_utf8(&output.stdout).unwrap();
let start_of_json = output_str.find('{').ok_or(anyhow!("No json in output"))?;
let start_of_json = output_str.find('{').ok_or(anyhow!("No json in output: {}", output_str))?;
serde_json::from_str::<Value>(output_str[start_of_json..].trim())?
};

Expand Down Expand Up @@ -238,7 +238,7 @@ impl TestClient {
.await?;
let new_address = {
let output_str = std::str::from_utf8(&output.stdout).unwrap();
let start_of_json = output_str.find('{').ok_or(anyhow!("No json in output"))?;
let start_of_json = output_str.find('{').ok_or(anyhow!("No json in output: {}", output_str))?;
let json_result = serde_json::from_str::<Value>(output_str[start_of_json..].trim())?;
let address_json = json_result
.path("$.address")
Expand Down

0 comments on commit 460b8f0

Please sign in to comment.