Verified Commit 318fe4e6 authored by Tomas Vik (OOO back on 2026-08-31)'s avatar Tomas Vik (OOO back on 2026-08-31) 🌴 Committed by GitLab
Browse files

fix(auth): don't make failing token check requests

parent 50f669e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ describe('LanguageClientWrapper', () => {
            baseUrl: gitlabPlatformForAccount.account.instanceUrl,
            projectPath: '',
            token: gitlabPlatformForAccount.account.token,
            tokenType: 'pat',
            telemetry: {
              actions: [{ action: TRACKING_EVENTS.SHOWN }, { action: TRACKING_EVENTS.ACCEPTED }],
            },
+6 −1
Original line number Diff line number Diff line
@@ -281,7 +281,11 @@ export class LanguageClientWrapperImpl implements LanguageClientWrapper {
      log.debug(`[auth] Sending empty credentials to language server (no account available)`);
    }
    await this.#client.sendNotification(DidChangeConfigurationNotification.type, {
      settings: { baseUrl: account?.instanceUrl, token: account?.token },
      settings: {
        baseUrl: account?.instanceUrl,
        token: account?.token,
        tokenType: account?.type === 'oauth' ? 'oauth' : 'pat',
      },
    });
  };

@@ -306,6 +310,7 @@ export class LanguageClientWrapperImpl implements LanguageClientWrapper {
    const settings: ClientConfig = {
      baseUrl: platform.account.instanceUrl,
      token: platform.account.token,
      tokenType: platform.account.type === 'oauth' ? 'oauth' : 'pat',
      telemetry: {
        trackingUrl: extensionConfiguration.trackingUrl,
        enabled: this.#telemetryEnvironment.isTelemetryEnabled(),