{"record":{"id":"9f52c02150b9965d","repo":"diegosouzapw/OmniRoute","slug":"device-auth-initiation-failed-error","errorCode":null,"errorMessage":"Device auth initiation failed: ${error}","messagePattern":"Device auth initiation failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/oauth/providers/kilocode.ts","lineNumber":19,"sourceCode":"import { KILOCODE_CONFIG } from \"../constants/oauth\";\n\nexport const kilocode = {\n  config: KILOCODE_CONFIG,\n  flowType: \"device_code\",\n  requestDeviceCode: async (config) => {\n    const response = await fetch(config.initiateUrl, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n\n    if (!response.ok) {\n      if (response.status === 429) {\n        throw new Error(\"Too many pending authorization requests. Please try again later.\");\n      }\n      const error = await response.text();\n      throw new Error(`Device auth initiation failed: ${error}`);\n    }\n\n    const data = await response.json();\n    return {\n      device_code: data.code,\n      user_code: data.code,\n      verification_uri: data.verificationUrl,\n      verification_uri_complete: data.verificationUrl,\n      expires_in: data.expiresIn || 300,\n      interval: 3,\n    };\n  },\n  pollToken: async (config, deviceCode) => {\n    const response = await fetch(`${config.pollUrlBase}/${deviceCode}`);\n\n    if (response.status === 202) {\n      return { ok: false, data: { error: \"authorization_pending\" } };\n    }","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/providers/kilocode.ts#L1-L37","documentation":"Error \"Device auth initiation failed: ${error}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/providers/kilocode.ts:19 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}