Title: Bug: fetchIssueIDs discards GraphQL error — callers receive static "failed to get issue ID" with no root cause · Issue #2067 · github/github-mcp-server · GitHub
Open Graph Title: Bug: fetchIssueIDs discards GraphQL error — callers receive static "failed to get issue ID" with no root cause · Issue #2067 · github/github-mcp-server
X Title: Bug: fetchIssueIDs discards GraphQL error — callers receive static "failed to get issue ID" with no root cause · Issue #2067 · github/github-mcp-server
Description: Bug Description fetchIssueIDs in pkg/github/issues.go discards the underlying GraphQL error at both call sites (lines 65 and 87), returning only a static string with zero diagnostic context. Affected Code File: pkg/github/issues.go, line...
Open Graph Description: Bug Description fetchIssueIDs in pkg/github/issues.go discards the underlying GraphQL error at both call sites (lines 65 and 87), returning only a static string with zero diagnostic context. Affect...
X Description: Bug Description fetchIssueIDs in pkg/github/issues.go discards the underlying GraphQL error at both call sites (lines 65 and 87), returning only a static string with zero diagnostic context. Affect...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2067
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: fetchIssueIDs discards GraphQL error — callers receive static \"failed to get issue ID\" with no root cause","articleBody":"## Bug Description\n\n`fetchIssueIDs` in `pkg/github/issues.go` discards the underlying GraphQL error at **both** call sites (lines 65 and 87), returning only a static string with zero diagnostic context.\n\n## Affected Code\n\n**File:** `pkg/github/issues.go`, lines 64-66 and 86-88\n\n```go\n// Line 64-66\nif err := gqlClient.Query(ctx, &query, vars); err != nil {\n return \"\", \"\", fmt.Errorf(\"failed to get issue ID\") // err is dropped\n}\n\n// Line 86-88\nif err := gqlClient.Query(ctx, &query, vars); err != nil {\n return \"\", \"\", fmt.Errorf(\"failed to get issue ID\") // err is dropped\n}\n```\n\nBoth use `fmt.Errorf(\"failed to get issue ID\")` with no `%w` verb and no reference to the captured `err`.\n\n## Impact\n\nWhen `CloseIssue` (line ~1308) calls `fetchIssueIDs` and it fails, the caller's error message — *\"Failed to find issues\"* — cannot be supplemented with the actual root cause. Possible root causes that are silently swallowed:\n\n- **Authentication failure** (expired token, insufficient scopes)\n- **Rate limiting** (GraphQL secondary rate limits)\n- **Network error** (DNS, timeout, TLS)\n- **Issue not found** (wrong owner/repo, deleted issue)\n\nAll of these produce the same opaque error: `failed to get issue ID`.\n\n## Steps to Reproduce\n\n1. Call `CloseIssue` with a valid owner/repo but an issue number that doesn't exist\n2. Or trigger a GraphQL rate limit\n3. Observe the error message contains no diagnostic information about *why* the query failed\n\n## Expected Behavior\n\nError should wrap the original cause:\n```go\nreturn \"\", \"\", fmt.Errorf(\"failed to get issue ID: %w\", err)\n```\n\n## Actual Behavior\n\nError is a static string with no root cause context.\n\n## Proposed Solution\n\n**Option A (recommended):** Wrap the error with `%w`\n```go\n// Both call sites:\nif err := gqlClient.Query(ctx, &query, vars); err != nil {\n return \"\", \"\", fmt.Errorf(\"failed to get issue ID: %w\", err)\n}\n```\n\n**Option B:** Use the project's `ghErrors` package for consistency with REST error handling patterns used elsewhere in the codebase.\n\n| Aspect | Option A | Option B |\n|--------|----------|----------|\n| Complexity | One-line change per site | Requires new ghErrors helper for GraphQL |\n| Breaking changes | None | None |\n| Consistency | Follows Go stdlib convention | Follows project's error-reporting pattern |\n\nHappy to submit a PR for this fix.","author":{"url":"https://github.com/marlonbarreto-git","@type":"Person","name":"marlonbarreto-git"},"datePublished":"2026-02-23T14:32:06Z","url":"https://github.com/github/github-mcp-server/issues/2067"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea7c2ab2-a8d7-5a24-bb61-16bbf2a96f58 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9A0:1CD523:1B020F3:23CFAA1:6B0685A1 |
| html-safe-nonce | 787eaecbd4c3a44de7598d702a14fd1c778f99bb841b88ebe11149c68b6b3d6f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUEwOjFDRDUyMzoxQjAyMEYzOjIzQ0ZBQTE6NkIwNjg1QTEiLCJ2aXNpdG9yX2lkIjoiNjUxOTkxOTU5MzAzNjA4ODczNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cbd4983612daedfa10f0c0c6b89ac91b805796981aa2d5717d96541d70b95189 |
| hovercard-subject-tag | issue:3978484734 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2067/issue_layout |
| twitter:image | https://opengraph.githubassets.com/00b1b1e2a4f982624519bb546ced2e17e3ff80a0399b095f7b595e7473d1eef5/github/github-mcp-server/issues/2067 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/00b1b1e2a4f982624519bb546ced2e17e3ff80a0399b095f7b595e7473d1eef5/github/github-mcp-server/issues/2067 |
| og:image:alt | Bug Description fetchIssueIDs in pkg/github/issues.go discards the underlying GraphQL error at both call sites (lines 65 and 87), returning only a static string with zero diagnostic context. Affect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | marlonbarreto-git |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width