From 04b518f4868a202d14d36a0f03ad34a0d5f6b6fa Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Tue, 2 Sep 2025 07:22:10 -0400 Subject: [PATCH] Fully stringify `AggregateError` when writing to the Output channel --- src/utils/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/index.ts b/src/utils/index.ts index 47f4cdb6..16acb9a4 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -57,6 +57,11 @@ export const identifierRegex = /^(?:%|\p{L})[\p{L}\d]*$/u; */ export function stringifyError(error): string { try { + if (error instanceof AggregateError) { + // Need to stringify the inner errors + const errs = error.errors.map(stringifyError).filter((s) => s != ""); + return errs.length ? `AggregateError:\n- ${errs.join("\n- ")}` : ""; + } return ( error == undefined ? ""