Skip to content

Fix error logging and table row accumulation in summary.ts#6

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/improve-error-logging
Draft

Fix error logging and table row accumulation in summary.ts#6
Copilot wants to merge 3 commits intomainfrom
copilot/improve-error-logging

Conversation

Copy link

Copilot AI commented Feb 6, 2026

Purpose

Fixes two issues in vulnerability summary generation:

Error logging (line 261): Template string interpolation of caught exceptions produces [object Object] instead of actionable error messages.

Table row accumulation (line 273): The rows array is declared outside the manifest loop but only consumed inside it. When processing multiple manifests, each table includes rows from all previous manifests, resulting in duplicate/incorrect entries.

Changes

  • Line 261: Extract error message using e instanceof Error ? e.message : String(e) before interpolation
  • Line 273: Scope rows array inside the manifest loop to reset state per iteration
// Before: rows accumulate across manifests
const rows: SummaryTableRow[] = []
for (const manifest of manifests) {
  // populate rows...
  addTable([...rows])  // includes previous manifest's rows
}

// After: fresh array per manifest
for (const manifest of manifests) {
  const rows: SummaryTableRow[] = []
  // populate rows...
  addTable([...rows])  // only current manifest's rows
}

Related Issues

Referenced in actions#1045 (comment)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 6, 2026 23:22
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve error logging in API call failure Fix error logging and table row accumulation in summary.ts Feb 6, 2026
Copilot AI requested a review from felickz February 6, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants