You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tool error paths skip NewGitHubAPIErrorResponse, so rate-limit details are lost (list_releases, security advisories, search_issues and others) #4028
Several tools return a plain error when the GitHub API call fails, instead of going through ghErrors.NewGitHubAPIErrorResponse as docs/error-handling.md describes. Their siblings list_tags and list_branches use the helper.
Affected paths: list_releases and get_latest_release (pkg/github/repositories.go), the four security-advisory tools (pkg/github/security_advisories.go), search_pull_requests (pkg/github/search_utils.go), and search_issues and list_issue_types (pkg/github/issues.go).
Because the helper is skipped, the error never reaches the remote server's middleware, and users lose the rate-limit message. With a rate-limited response, list_releases returns failed to list releases: GET ...: 403 API rate limit exceeded [rate reset in 60m00s], while list_tags returns failed to list tags: GitHub API rate limit exceeded. Retry after 1h0m0s.
A table test using NewMockedHTTPClient with a 404 response fails for all nine tools and passes for list_tags. The fix is a one-line swap per site; eight existing subtests that assert the old handler error would need flipping.
Activity