From 704bdaf96992352d262f18d334d6adc142cdb2f1 Mon Sep 17 00:00:00 2001 From: Zentrik Date: Wed, 26 Jun 2024 20:44:38 +0100 Subject: [PATCH] More robust parsing --- buildkite_logs.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buildkite_logs.jl b/buildkite_logs.jl index 6fc56f35d..25c9241bd 100644 --- a/buildkite_logs.jl +++ b/buildkite_logs.jl @@ -42,7 +42,13 @@ function get_log(sha, branch) details_json = HTTP.get(details_url).body |> JSON3.read idx = findfirst(x -> x.name == ":linux: build x86_64-linux-gnu", details_json.jobs) - if details_json.jobs[idx].state != "finished" + try + if details_json.jobs[idx].state != "finished" + return :not_finished + end + catch err + println("Error processing build status for $sha") + println("Error: $err") return :not_finished end