{"record":{"id":"b92886c7e6077758","repo":"yamadashy/repomix","slug":"github-server-error-please-try-again-later","errorCode":null,"errorMessage":"GitHub server error. Please try again later.","messagePattern":"GitHub server error\\. Please try again later\\.","errorType":"http","errorClass":"RepomixError","httpStatus":null,"severity":"warning","filePath":"src/core/git/gitHubArchiveApi.ts","lineNumber":62,"sourceCode":"    );\n  }\n\n  if (response.status === 403) {\n    const rateLimitRemaining = response.headers.get('X-RateLimit-Remaining');\n    if (rateLimitRemaining === '0') {\n      const resetTime = response.headers.get('X-RateLimit-Reset');\n      const resetDate = resetTime ? new Date(Number.parseInt(resetTime, 10) * 1000) : null;\n      throw new RepomixError(\n        `GitHub API rate limit exceeded. ${resetDate ? `Rate limit resets at ${resetDate.toISOString()}` : 'Please try again later.'}`,\n      );\n    }\n    throw new RepomixError(\n      'Access denied. The repository might be private or you might not have permission to access it.',\n    );\n  }\n\n  if (response.status === 500 || response.status === 502 || response.status === 503 || response.status === 504) {\n    throw new RepomixError('GitHub server error. Please try again later.');\n  }\n\n  if (!response.ok) {\n    throw new RepomixError(`GitHub API error: ${response.status} ${response.statusText}`);\n  }\n};\n","sourceCodeStart":44,"sourceCodeEnd":69,"githubUrl":"https://github.com/yamadashy/repomix/blob/f465ad909315a22120636baf03fa5e28701a50cb/src/core/git/gitHubArchiveApi.ts#L44-L69","documentation":"GitHub returned one of the server-side error statuses 500, 502, 503, or 504, meaning the request was valid but GitHub's infrastructure failed to serve the archive. The library surfaces it as a plain retryable error instead of the raw status.","triggerScenarios":"checkGitHubResponse receives status 500, 502, 503, or 504 from the GitHub API/archive endpoint — a transient GitHub-side outage or gateway timeout while generating/serving the archive.","commonSituations":"GitHub incidents (check githubstatus.com); very large repositories causing archive generation timeouts; momentary load-balancer blips during peak traffic.","solutions":["Retry after a short delay — these statuses are transient by definition.","Check https://www.githubstatus.com for an ongoing incident and wait it out if present.","For consistently timing-out huge repos, fall back to `git clone` and run repomix on the local checkout.","If behind a proxy, confirm the 5xx comes from GitHub and not your own gateway (inspect response headers)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const status = await fetch('https://api.github.com/').then(r => r.status).catch(() => 0);\nif (status >= 500) throw new Error('GitHub is having server issues; retry later.');","typeGuard":null,"tryCatchPattern":"try {\n  await pack({ remote: url });\n} catch (e) {\n  if (e instanceof RepomixError && e.message.includes('GitHub server error')) {\n    // 5xx is transient: exponential backoff retry\n    await new Promise(r => setTimeout(r, 10000));\n  } else throw e;\n}","preventionTips":["Add automatic retries with exponential backoff around remote packing operations.","Check githubstatus.com before large batch runs.","Fall back to git clone for very large repos prone to archive timeouts."],"tags":["github","http-5xx","server-error","transient"],"backgroundTag":"http-server-error","analyzedSha":"f465ad909315a22120636baf03fa5e28701a50cb","analyzedAt":"2026-08-29T01:27:42.024Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}