986
this._logService.warn(`[CopilotApiService] Ignoring non-loopback CAPI URL override ${overrideApi}; falling back to normal endpoint discovery`);
987
}
989
>
const response = await this._fetch(userUrl, {
990
>
method: 'GET',
991
>
headers: {
992
>
'Authorization': `Bearer ${githubToken}`,
993
>
'Accept': 'application/json',
994
>
'X-GitHub-Api-Version': USER_API_VERSION,
995
>
},
996
>
});
997
>
998
>
if (!response.ok) {
999
const text = await response.text().catch(() => '');
1000
throw new Error(`Copilot endpoint discovery failed: ${response.status} ${response.statusText} — ${text}`);