Kong/insomnia · error · Error
unable to get stars from GitHub API
Error message
unable to get stars from GitHub API
What it means
Thrown in GitHubStarsButton's mount effect when the GitHub REST API response for Kong/insomnia does not include a `watchers` field — i.e. the request succeeded at fetch level but returned an unexpected payload (rate-limit or error JSON body), so no star count can be derived. The component then shows the error state.
Solutions
- Retry later; GitHub API rate limits commonly cause non-star payloads for unauthenticated requests
- Check network/proxy availability to api.github.com
- The UI already falls back to the last cached count from localStorage, so this is non-fatal
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/insomnia/src/ui/components/github-stars-button.tsx:32 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26).
Data as JSON: /api/errors/0427b7a50d863d8c.
Report an issue: GitHub.
Appendix: source
Thrown at packages/insomnia/src/ui/components/github-stars-button.tsx:32
const initialState = Number.parseInt(localStorageStars || '30000', 10);
const [starCount, setStarCount] = useState(initialState);
useEffect(() => {
localStorage.setItem(LOCALSTORAGE_GITHUB_STARS_KEY, String(starCount));
}, [starCount]);
const [error, setError] = useState<Error | null>(null);
reactUse.useMount(() => {
if (!isMounted()) {
return;
}
fetch(`${getGitHubRestApiUrl()}/repos/Kong/insomnia`)
.then(data => data.json())
.then(info => {
if (!('watchers' in info)) {
throw new Error('unable to get stars from GitHub API');
}
if (!isMounted()) {
return;
}
setStarCount(info.watchers);
setError(null);
})
.catch(error => {
if (!isMounted()) {
return;
}
console.error('error fetching GitHub stars', error);
setError(error);
});
});View on GitHub (pinned to d9bb2b0142)