Skip to content

Commit

Permalink
add error context to log_futures handling
Browse files Browse the repository at this point in the history
  • Loading branch information
raine committed Aug 26, 2023
1 parent d216417 commit 6e12461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ghtool/src/commands/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub async fn handle_command<T: Command>(
let mut log_futures: FuturesUnordered<_> = get_log_futures(&client, repo, &failed_check_runs);
let mut all_checks_errors = Vec::new();
while let Some(result) = log_futures.next().await {
let bytes = result.map_err(|_| eyre::eyre!("Error when getting job logs"))?;
let bytes = result.map_err(|err| eyre::eyre!("Error when getting job logs: {err}"))?;
let log = String::from_utf8_lossy(&bytes);
let check_errors = command.parse_log(&log)?;
all_checks_errors.push(check_errors);
Expand Down

0 comments on commit 6e12461

Please sign in to comment.