Skip to content

Commit

Permalink
feat(validation): show validation error message (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
matzuk authored Aug 17, 2024
1 parent 69c4d67 commit 359cbb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,8 @@ pub struct TestRun {
pub completed: Option<OffsetDateTime>,
#[serde(rename = "total_run_time")]
pub total_run_time_seconds: Option<f64>,
#[serde(rename = "error_message")]
pub error_message: Option<String>,
}

#[derive(Deserialize)]
Expand Down
5 changes: 5 additions & 0 deletions src/interactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ impl TriggerTestRunInteractor {
let data = serialize_event(&result_file, &event)?;
file.write_all(data.as_bytes()).await?;
}
if let Some(error_message) = stat.error_message {
formatter.message(&format!("Error message:"));
let formatted_error_message = error_message.replace("\n", "\n\t");
formatter.message(&format!("\t{}", formatted_error_message));
}

if let Some(output) = output {
formatter.stage("Fetching file list...");
Expand Down

0 comments on commit 359cbb6

Please sign in to comment.