{"record":{"id":"1a0bc571114d6ad7","repo":"diegosouzapw/OmniRoute","slug":"grok-device-authorization-response-is-incomplete","errorCode":null,"errorMessage":"Grok device authorization response is incomplete","messagePattern":"Grok device authorization response is incomplete","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/oauth/providers/grok-cli.ts","lineNumber":130,"sourceCode":"      scope: config.scope,\n      referrer: GROK_BUILD_OAUTH_REFERRER,\n    }),\n  });\n  const data = await parseOAuthResponse(response);\n\n  if (!response.ok) {\n    throw new Error(\n      typeof data.error_description === \"string\"\n        ? data.error_description\n        : \"Grok device authorization failed\"\n    );\n  }\n  if (\n    typeof data.device_code !== \"string\" ||\n    typeof data.user_code !== \"string\" ||\n    typeof data.verification_uri !== \"string\"\n  ) {\n    throw new Error(\"Grok device authorization response is incomplete\");\n  }\n  if (!/^[A-Za-z0-9-]+$/.test(data.user_code)) {\n    throw new Error(\"Grok returned an invalid device code\");\n  }\n  validateVerificationUri(data.verification_uri);\n  if (typeof data.verification_uri_complete === \"string\") {\n    validateVerificationUri(data.verification_uri_complete);\n  }\n\n  return {\n    device_code: data.device_code,\n    user_code: data.user_code,\n    verification_uri: data.verification_uri,\n    verification_uri_complete:\n      typeof data.verification_uri_complete === \"string\"\n        ? data.verification_uri_complete\n        : data.verification_uri,\n    expires_in: typeof data.expires_in === \"number\" ? data.expires_in : 1800,","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/providers/grok-cli.ts#L112-L148","documentation":"Error \"Grok device authorization response is incomplete\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/providers/grok-cli.ts:130 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"}