Skip to content

Commit 698d6c2

Browse files
authored
Wrap token check in catch (#1152)
Fixes microsoft/vscode#268326
1 parent 8ddd43f commit 698d6c2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/platform/workspaceChunkSearch/node/embeddingsChunkSearch.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,13 @@ export class EmbeddingsChunkSearch extends Disposable implements IWorkspaceChunk
367367
}
368368

369369
private async getExpandedClientSideIndexingStatus(): Promise<'enabled' | 'available' | 'disabled'> {
370-
const token = await this._authService.getCopilotToken();
371-
if (!token?.isExpandedClientSideIndexingEnabled()) {
372-
return 'disabled';
370+
try {
371+
const token = await this._authService.getCopilotToken();
372+
if (!token?.isExpandedClientSideIndexingEnabled()) {
373+
return 'disabled';
374+
}
375+
} catch {
376+
// noop
373377
}
374378

375379
const cache = this._extensionContext.workspaceState.get<boolean | undefined>(this._hasPromptedExpandedIndexingKey);

0 commit comments

Comments
 (0)