Skip to content

Conversation

@omgitsads
Copy link
Member

Annotate raw client errors in the context, to allow us to filter tool call failures in our metrics based on the error type.

@omgitsads omgitsads requested a review from a team as a code owner December 10, 2025 17:01
Copilot AI review requested due to automatic review settings December 10, 2025 17:01
Copy link
Contributor

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 adds support for annotating raw client errors in the context to enable error-type-based filtering in metrics. The implementation follows the existing patterns for GitHub API and GraphQL errors.

Key changes:

  • Introduced GitHubRawAPIError type and associated error handling functions
  • Added raw error tracking to GitHubCtxErrors context structure
  • Updated GetFileContents to use the new raw error annotation instead of generic error handling

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
pkg/errors/error.go Adds GitHubRawAPIError type, context tracking, and NewGitHubRawAPIErrorResponse function for annotating raw API errors
pkg/github/repositories.go Updates error handling in GetFileContents to use the new raw API error annotation

@mattdholloway mattdholloway self-assigned this Dec 15, 2025
Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

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.

3 participants