Skip to content

Change throw statement to use Error object#187

Open
awgeorge wants to merge 1 commit intoactions:mainfrom
awgeorge:patch-1
Open

Change throw statement to use Error object#187
awgeorge wants to merge 1 commit intoactions:mainfrom
awgeorge:patch-1

Conversation

@awgeorge
Copy link
Copy Markdown

@awgeorge awgeorge commented Jan 5, 2026

I'm getting an error in my pipeline "Error: TypeError: error must be an instance of Error" which I believe is related to this line of code.

I'm getting an error in my pipeline "Error: TypeError: error must be an instance of Error" which I believe is related to this line of code.
@awgeorge awgeorge requested a review from a team as a code owner January 5, 2026 16:24
Copilot AI review requested due to automatic review settings January 5, 2026 16:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a TypeError in the pipeline by converting a throw statement from throwing a plain string to throwing an Error object. The error was caused by convertErrorToAnnotationProperties() in error-utils.js requiring Error instances, which was not satisfied when throwing a string.

Key Changes:

  • Updated the default case in the getConfigParserSettings() switch statement to throw an Error object instead of a string

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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