From 52e5e0bec6669801ca86d467dfa7cc05a245d2dd Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 23 Jul 2026 10:46:17 +0200 Subject: [PATCH] :bug: Add more fields on table format on errors report cli client --- scripts/error-reports.mjs | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/scripts/error-reports.mjs b/scripts/error-reports.mjs index 97fdc808d7..6b7924e474 100755 --- a/scripts/error-reports.mjs +++ b/scripts/error-reports.mjs @@ -214,11 +214,30 @@ function formatGetTable(data) { lines.push(`Version: ${data.version || "(none)"}`); lines.push(`Hint: ${data.hint || "(none)"}`); lines.push(`HREF: ${data.href || "(none)"}`); + + if (data.context) { + lines.push(`--- Context ---`); + const indented = data.context.split("\n").map(line => ` ${line}`).join("\n"); + lines.push(indented); + } + + if (data.params && data.params !== "{}") { + lines.push(`--- Params ---`); + const indented = data.params.split("\n").map(line => ` ${line}`).join("\n"); + lines.push(indented); + } + + if (data.props && data.props !== "{}") { + lines.push(`--- Props ---`); + const indented = data.props.split("\n").map(line => ` ${line}`).join("\n"); + lines.push(indented); + } + + const body = data.trace || data.report; lines.push(`--- Report ---`); - - if (data.report) { - const indentedReport = data.report.split("\n").map(line => ` ${line}`).join("\n"); - lines.push(indentedReport); + if (body) { + const indented = body.split("\n").map(line => ` ${line}`).join("\n"); + lines.push(indented); } else { lines.push(" (none)"); }