From a98b9f23195548a7f72e91329ae3c88f04dedbb6 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 22 Apr 2026 12:06:32 +0530 Subject: [PATCH] Handle malformed optional benchmark summaries --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a52f051fa7..de5fbfc433 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -778,7 +778,11 @@ jobs: try { return JSON.parse(fs.readFileSync(path, 'utf8')); } catch (error) { - throw new Error(`Invalid benchmark summary ${path}: ${error.message}`); + if (required) { + throw new Error(`Invalid benchmark summary ${path}: ${error.message}`); + } + console.error(`Invalid benchmark summary ${path}: ${error.message}`); + return null; } }