Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add raw client error annotation and annotate GetFileContents#1570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mattdholloway merged 15 commits intomainfromraw-client-error-annotation
Dec 19, 2025

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.

SamMorrowDrums reacted with heart emoji
@omgitsadsomgitsads requested a review froma team as acode ownerDecember 10, 2025 17:01
CopilotAI review requested due to automatic review settingsDecember 10, 2025 17:01
Copy link
Contributor

CopilotAI 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:

  • IntroducedGitHubRawAPIError type and associated error handling functions
  • Added raw error tracking toGitHubCtxErrors context structure
  • UpdatedGetFileContents 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.

FileDescription
pkg/errors/error.goAddsGitHubRawAPIError type, context tracking, andNewGitHubRawAPIErrorResponse function for annotating raw API errors
pkg/github/repositories.goUpdates error handling inGetFileContents to use the new raw API error annotation

@mattdhollowaymattdholloway self-assigned thisDec 15, 2025
Copy link
Contributor

CopilotAI 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.

mattdhollowayand others added2 commitsDecember 15, 2025 17:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

CopilotAI 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 2 comments.

Comment on lines +87 to +90
rawError:=rawErrors[0]
assert.Equal(t,"failed to fetch raw content",rawError.Message)
assert.Equal(t,resp,rawError.Response)
assert.Equal(t,originalErr,rawError.Err)

Choose a reason for hiding this comment

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

The test should verify the Error() method output for consistency with the other error type tests. The API error test (line 41) and GraphQL error test (line 63) both verify the Error() method output, but this test doesn't. Add an assertion like:assert.Equal(t, "failed to fetch raw content: raw content not found", rawError.Error())

Copilot uses AI. Check for mistakes.
@mattdhollowaymattdhollowayforce-pushed theraw-client-error-annotation branch fromb4b4eaf to349877fCompareDecember 17, 2025 16:12
@mattdhollowaymattdholloway merged commitb79d126 intomainDec 19, 2025
17 checks passed
@mattdhollowaymattdholloway deleted the raw-client-error-annotation branchDecember 19, 2025 14:23
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@JoannaaKLJoannaaKLJoannaaKL approved these changes

Assignees

@mattdhollowaymattdholloway

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@omgitsads@JoannaaKL@mattdholloway

[8]ページ先頭

©2009-2025 Movatter.jp