Kong/insomnia · error
Failed to initiate the GitLab OAuth flow: ${errorMessage}
Error message
Failed to initiate the GitLab OAuth flow: ${errorMessage} What it means
Error "Failed to initiate the GitLab OAuth flow: ${errorMessage}" thrown in Kong/insomnia.
Source
Thrown at packages/insomnia/src/sync/git/providers/gitlab.ts:373
client_id: clientId,
scope,
state,
response_type: 'code',
redirect_uri: redirectUri,
code_challenge: challenge,
code_challenge_method: 'S256',
}).toString();
await shell.openExternal(gitlabURL.toString());
return {
authUrl: gitlabURL.toString(),
state,
};
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);
console.error('Failed to initiate the GitLab OAuth flow:', error);
throw new Error(`Failed to initiate the GitLab OAuth flow: ${errorMessage}`);
}
}
/**
* Complete OAuth flow with PKCE
* Exchanges code for token and creates/updates credential in database
*/
async completeOAuth(code: string, state: string): Promise<OAuthCompleteResult> {
try {
// Validate state and get verifier for PKCE
let verifier = gitlabStatesCache.get(state)?.verifier;
const reauthorizingCredentialId = gitlabStatesCache.get(state)?.credentialId;
if (PLAYWRIGHT_TEST) {
verifier = 'test-verifier';
}
if (!verifier) {View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia/src/sync/git/providers/gitlab.ts:373 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/761bf62d72d5e4cf.
Report an issue: GitHub.