Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 26, 2025

TypeScript compilation was failing due to improper error type handling in catch blocks. The optional chaining approach error?.message doesn't satisfy TypeScript's type constraints when error has implicit {} type.

Changes:

  • Updated error handling to use error instanceof Error ? error.message : String(error) pattern
  • Applied fix to both error handlers in the file (lines 151 and 431)

This aligns with the codebase's established error handling pattern used in create_issue.cjs, create_pull_request.cjs, and other files.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…_reaction_and_edit_comment.cjs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add tests and run tests for add_reaction_and_edit_comment.cjs Fix TypeScript error handling in add_reaction_and_edit_comment.cjs Dec 26, 2025
Copilot AI requested a review from pelikhan December 26, 2025 19:31
@pelikhan pelikhan marked this pull request as ready for review December 26, 2025 19:34
@pelikhan pelikhan merged commit 4e3d98b into jsweep-clean-add-reaction-and-edit-comment-36c6dd997570a6bd Dec 26, 2025
@pelikhan pelikhan deleted the copilot/sub-pr-7807 branch December 26, 2025 19:34
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