Skip to content

fix(cli): surface real GitHub status on skill download failures#2785

Closed
fahreddinozcan wants to merge 2 commits into
masterfrom
ctx7-1732-surface-github-api-errors-on-cli
Closed

fix(cli): surface real GitHub status on skill download failures#2785
fahreddinozcan wants to merge 2 commits into
masterfrom
ctx7-1732-surface-github-api-errors-on-cli

Conversation

@fahreddinozcan

@fahreddinozcan fahreddinozcan commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Surfaces the real GitHub HTTP status when CLI skill downloads fail, instead of a bare "GitHub API error", and prints an actionable tip.

  • fetchRepoTree now returns the HTTP status on failure instead of null.
  • describeGitHubError maps 401 (invalid/expired token), 403 (rate limit), and 404 (repo/branch not found) to recognizable messages.
  • New githubErrorTip renders a tip: line in setup pointing users at GITHUB_TOKEN/GH_TOKEN or gh auth login, mirroring the existing EACCES tip.
  • Both downloadSkillFromGitHub and listSkillsFromGitHub report the descriptive error.

Fixes the confusion in #2363 where an expired token surfaced identically to a rate limit, leaving users unable to diagnose it.

Validated locally against the real download path: a dead token yields 401 (invalid or expired token) + tip, a bad repo yields 404, and a valid gh login downloads the skill with no error.

Map GitHub API failures (401/403/404) to actionable messages instead of a bare "GitHub API error", so an expired GITHUB_TOKEN/GH_TOKEN is distinguishable from a rate limit.
@linear-code

linear-code Bot commented Jun 17, 2026

Copy link
Copy Markdown

CTX7-1732

On 401/403 skill download failures, setup now prints a tip: line pointing users at GITHUB_TOKEN/GH_TOKEN or `gh auth login`, mirroring the existing EACCES tip.
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.

1 participant