Kong/insomnia · error
HTTP Error
Error message
HTTP Error: ${response.status} ${response.statusText} What it means
HTTP failure check in GitHubProvider.validateCredentials: GET /user on the configured GitHub API returned a non-OK status (typically 401 for a revoked token or uninstalled GitHub App), so the stored credential is treated as invalid.
Solutions
- Generate a new token or reinstall the GitHub App and update the credential
- Confirm the API URL matches the environment (github.com vs GitHub Enterprise) for the token
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/insomnia/src/sync/git/providers/github.ts:132 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/a606858d0858f5a1.
Report an issue: GitHub.
Appendix: source
Thrown at packages/insomnia/src/sync/git/providers/github.ts:132
/**
* Validate credentials against the GitHub API.
* Hits `GET /user` — lightweight and authoritative: returns 401 when the
* token is revoked or the GitHub App has been uninstalled.
*/
async validateCredentials(credential: GitCredentials): Promise<void> {
if (!isGitCredentialsV2(credential) || credential.provider !== 'github') {
throw new Error('Invalid credential type for GitHub provider');
}
const response = await net.fetch(`${this.config.apiUrl}/user`, {
headers: {
Authorization: `token ${credential.credentials.token}`,
},
});
if (!response.ok) {
throw new Error(`HTTP Error: ${response.status} ${response.statusText}`);
}
}
/**
* Fetch repositories accessible by the credential
*/
async fetchRepositories(credentials: GitCredentials, refresh?: boolean): Promise<ProviderRepository[]> {
if (!isGitCredentialsV2(credentials) || credentials.provider !== 'github') {
throw new Error('Invalid credential type for GitHub provider');
}
if (
!refresh &&
this.repositoryCache.has(credentials._id) &&
this.repositoryCache.get(credentials._id)?.length &&
this.repositoryCache.get(credentials._id)!.length > 0
) {
return this.repositoryCache.get(credentials._id)!;View on GitHub (pinned to d9bb2b0142)