throw new Error(`Copilot endpoint discovery failed: ${response.status} ${response.statusText} — ${text}`);
}
const envelope: ICopilotUserResponse = await response.json();
capiClient.updateDomains(
{ endpoints: envelope.endpoints ?? {}, sku: envelope.access_type_sku ?? '' },
// Enterprise base URI (e.g. `https://acme.ghe.com`), or `undefined` for