Budibase/budibase · warning
GitHub response: ${response.status}
Error message
GitHub response: ${response.status} What it means
getStars queries the public GitHub API for the Budibase repo's stargazers_count using fetch. Any non-ok HTTP response (rate limits, network errors surfacing as failure statuses, API downtime) triggers this generic error carrying only the status code.
Source
Thrown at packages/worker/src/api/controllers/global/github.ts:38
const envelope = (await cache.get(CACHE_KEY, {
useTenancy: false,
})) as StarsCacheEnvelope | null
if (envelope && envelope.expiresAt > Date.now()) {
ctx.body = envelope.value
return
}
try {
const response = await fetch(GITHUB_REPO_URL, {
headers: {
Accept: "application/vnd.github+json",
"User-Agent": USER_AGENT,
},
timeout: GITHUB_TIMEOUT_MS,
})
if (!response.ok) {
throw new Error(`GitHub response: ${response.status}`)
}
const json = (await response.json()) as { stargazers_count?: number }
const stars = json.stargazers_count
if (typeof stars !== "number") {
throw new Error("GitHub stars missing")
}
const value: GetGitHubStarsResponse = {
stars,
fetchedAt: new Date().toISOString(),
}
const toStore: StarsCacheEnvelope = {
value,
expiresAt: Date.now() + CACHE_TTL_MS,
}
View on GitHub (pinned to a81a902e9a)
Solutions
- Check the status in the message: 403/429 means rate limiting — add a GITHUB_TOKEN or reduce call frequency
- Add caching/backoff so the endpoint is called less often
- Retry after the rate-limit window resets (see X-RateLimit-Reset response header)
- Verify api.github.com status if 5xx; confirm the repo path is correct if 404
Defensive patterns
Strategy: retry
Validate before calling
// check rate-limit headroom before calling
const res = await fetch("https://api.github.com/rate_limit")
const { remaining } = (await res.json()).resources.core
if (remaining <= 0) throw new Error("GitHub rate limit exhausted") Type guard
function isGitHubOk(res: Response): boolean {
return res.ok && res.status >= 200 && res.status < 300
} Try / catch
try {
const stars = await getStars()
} catch (err) {
if (err.message.startsWith("GitHub response: 403")) {
// rate limited: back off / use a token; else fall back to cached value
}
} Prevention
- Cache the stargazers value instead of calling GitHub per request
- Use an authenticated GITHUB_TOKEN to raise the rate limit
- Respect X-RateLimit-Reset and apply exponential backoff
- Monitor GitHub API status for incidents causing 5xx responses
When it happens
Trigger: GitHub API returns 403 (rate limit without a token), 5xx outages, 404 if the repo path changed, or any other non-2xx response from the fetch call.
Common situations: Unauthenticated GitHub API rate-limiting on shared egress IPs (60 req/hour), CI environments with heavy outbound calls, temporary GitHub incidents.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- GitHub stars missing
- Unexpected response when fetching openid-configuration: ${re
- unexpected response ${response.statusText}
- Unexpected response ${response.statusText}
- Failed to retrieve skeleton metadata
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/2ddc1f2d889e79e2.
Report an issue: GitHub.