From 6e12461d67d557f1cd3e84533ac6c46bb307df42 Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Sat, 26 Aug 2023 11:15:56 +0300 Subject: [PATCH] add error context to log_futures handling --- ghtool/src/commands/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghtool/src/commands/command.rs b/ghtool/src/commands/command.rs index 8183e54..b8b78b7 100644 --- a/ghtool/src/commands/command.rs +++ b/ghtool/src/commands/command.rs @@ -108,7 +108,7 @@ pub async fn handle_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);