{"record":{"id":"22cb675c91e9568d","repo":"Kong/insomnia","slug":"http-error-response-status-response-statuste-22cb67","errorCode":null,"errorMessage":"HTTP Error: ${response.status} ${response.statusText}","messagePattern":"HTTP Error: (.+?) (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/sync/git/providers/gitlab.ts","lineNumber":196,"sourceCode":"\n  /**\n   * Validate credentials against the GitLab API.\n   * Hits `GET /user` — lightweight and authoritative: returns 401 when the\n   * token is revoked or has expired (and auto-renewal is not possible).\n   */\n  async validateCredentials(credential: GitCredentials): Promise<void> {\n    if (!isGitCredentialsV2(credential) || credential.provider !== 'gitlab') {\n      throw new Error('Invalid credential type for GitLab provider');\n    }\n\n    const response = await net.fetch(`${this.config.apiUrl}/user`, {\n      headers: {\n        Authorization: `Bearer ${credential.credentials?.token}`,\n      },\n    });\n\n    if (!response.ok) {\n      throw new Error(`HTTP Error: ${response.status} ${response.statusText}`);\n    }\n  }\n\n  /**\n   * Fetch projects (repositories) accessible by the credential\n   */\n  async fetchRepositories(credential: GitCredentials): Promise<ProviderRepository[]> {\n    if (!isGitCredentialsV2(credential) || credential.provider !== 'gitlab') {\n      throw new Error('Invalid credential type for GitLab provider');\n    }\n\n    const repos: ProviderRepository[] = [];\n    let page = 1;\n    const perPage = 100;\n\n    while (true) {\n      const response = await net.fetch(\n        `${this.config.apiUrl}/projects?membership=true&per_page=${perPage}&page=${page}&order_by=last_activity_at`,","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/sync/git/providers/gitlab.ts#L178-L214","documentation":"Error \"HTTP Error: ${response.status} ${response.statusText}\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/sync/git/providers/gitlab.ts:196 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}