mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-09 02:12:20 +01:00
Fix two bugs causing the Codebase Semantic Index to show a perpetual
"Indexing..." spinner when the API returns a 401 authentication error:
1. Fix `codeSearchRepo.ts`: Change `if (!triggerSuccess)` to
`if (triggerSuccess.isError())`. The Result object is always truthy,
so the error handling code was never executed — errors fell through
to set BuildingIndex state and return ok.
2. Fix `githubCodeSearchService.ts`: Return `{ type: 'not-authorized' }`
for 401/403 HTTP responses in both `triggerIndexing` and
`getRemoteIndexState`, matching the pattern in `adoCodeSearchService.ts`.
This allows callers to properly differentiate auth failures.
Co-authored-by: mjbvz <12821956+mjbvz@users.noreply.github.com>