Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

The workflow script had no error handling for file I/O or API calls, causing failures without informative messages when the agent config file is missing or the GitHub Models API is unavailable.

Changes

  • File read: Wrapped fs.readFileSync() in try-catch to handle missing/inaccessible agent config file
  • API call: Wrapped github.rest.models.runInference() in try-catch to handle API failures (auth, timeout, rate limits)
  • Response validation: Enhanced existing check to include actual response structure in error messages for debugging
  • User feedback: All error paths now post issue comments explaining the failure before the workflow fails

Error message example

### ⚠️ AI Triage Error

Failed to connect to the GitHub Models API for AI analysis.

**Error:** Request timeout after 30s

The issue triage could not be completed automatically. A team member will review this issue manually.

Each failure scenario surfaces diagnostic information while maintaining a clear signal that manual review is needed.


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

Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Copilot AI changed the title [WIP] Update issue triage workflow based on feedback Add error handling to AI triage workflow GitHub script Jan 28, 2026
Copilot AI requested a review from wadepickett January 28, 2026 19:58
@wadepickett
Copy link
Contributor

Closing. Copilot generated a sperate PR which was not wanted.

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