Kong/insomnia · error
GitLab API error
Error message
GitLab API error: ${response.statusText} What it means
API error in the GitLab provider's fetchRepositories: the paginated /projects request returned a non-OK status while listing the user's repositories. The HTTP status text is interpolated; typically an expired/revoked token or API failure.
Solutions
- Re-authenticate the GitLab credential if the token expired
- Check GitLab rate limits (429) and retry after the reset period
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at packages/insomnia/src/sync/git/providers/gitlab.ts:223 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/e4c4472229a96445.
Report an issue: GitHub.
Appendix: source
Thrown at packages/insomnia/src/sync/git/providers/gitlab.ts:223
throw new Error('Invalid credential type for GitLab provider');
}
const repos: ProviderRepository[] = [];
let page = 1;
const perPage = 100;
while (true) {
const response = await net.fetch(
`${this.config.apiUrl}/projects?membership=true&per_page=${perPage}&page=${page}&order_by=last_activity_at`,
{
headers: {
Authorization: `Bearer ${credential.credentials?.token}`,
},
},
);
if (!response.ok) {
throw new Error(`GitLab API error: ${response.statusText}`);
}
const data = (await response.json()) as GitLabProjectApiResponse[];
repos.push(
...data.map(project => ({
id: String(project.id),
name: project.name,
fullName: project.path_with_namespace,
cloneUrl: project.http_url_to_repo,
defaultBranch: project.default_branch,
permissions: {
admin: (project.permissions?.project_access?.access_level ?? 0) >= 40, // Owner/Maintainer
push: (project.permissions?.project_access?.access_level ?? 0) >= 30, // Developer+
pull: (project.permissions?.project_access?.access_level ?? 0) >= 20, // Reporter+
},
})),
);View on GitHub (pinned to d9bb2b0142)