diegosouzapw/OmniRoute · error
Device code request failed: ${error}
Error message
Device code request failed: ${error} What it means
Error "Device code request failed: ${error}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/providers/ghe-copilot.ts:38
export const gheCopilot = {
config: GHE_COPILOT_CONFIG,
flowType: "device_code" as const,
requestDeviceCode: async (config: any) => {
const gheUrl = normalizeGheUrl(config.gheUrl);
const response = await fetch(`${gheUrl}/login/device/code`, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
body: new URLSearchParams({
client_id: config.clientId,
scope: config.scopes,
}),
});
if (!response.ok) {
const error = await response.text();
throw new Error(`Device code request failed: ${error}`);
}
return await response.json();
},
pollToken: async (config: any, deviceCode: string, _codeVerifier?: string, extraData?: any) => {
const gheUrl = normalizeGheUrl(extraData?.gheUrl || config.gheUrl);
const response = await fetch(`${gheUrl}/login/oauth/access_token`, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
body: new URLSearchParams({
client_id: config.clientId,
device_code: deviceCode,
grant_type: "urn:ietf:params:oauth:grant-type:device_code",
}),
});
let data;View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/providers/ghe-copilot.ts:38 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/1dc5b391a423f2e2.
Report an issue: GitHub.