🐛 Add more fields on table format on errors report cli client

This commit is contained in:
Andrey Antukh 2026-07-23 10:46:17 +02:00
parent 7430ffe718
commit 52e5e0bec6

View File

@ -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)");
}