{"record":{"id":"a77712158d4fab29","repo":"HKUDS/nanobot","slug":"github-device-flow-was-denied","errorCode":null,"errorMessage":"GitHub device flow was denied.","messagePattern":"GitHub device flow was denied\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/providers/github_copilot_provider.py","lineNumber":143,"sourceCode":"            poll_payload = poll.json()\n\n            access_token = poll_payload.get(\"access_token\")\n            if access_token:\n                token_expires_in = int(poll_payload.get(\"expires_in\") or _LONG_LIVED_TOKEN_SECONDS)\n                break\n\n            error = poll_payload.get(\"error\")\n            if error == \"authorization_pending\":\n                time.sleep(current_interval)\n                continue\n            if error == \"slow_down\":\n                current_interval += 5\n                time.sleep(current_interval)\n                continue\n            if error == \"expired_token\":\n                raise RuntimeError(\"GitHub device code expired. Please run login again.\")\n            if error == \"access_denied\":\n                raise RuntimeError(\"GitHub device flow was denied.\")\n            if error:\n                desc = poll_payload.get(\"error_description\") or error\n                raise RuntimeError(str(desc))\n            time.sleep(current_interval)\n        else:\n            raise RuntimeError(\"GitHub device flow timed out.\")\n\n        user = client.get(\n            user_url,\n            headers={\n                \"Authorization\": f\"Bearer {access_token}\",\n                \"Accept\": \"application/vnd.github+json\",\n                \"User-Agent\": USER_AGENT,\n            },\n        )\n        user.raise_for_status()\n        user_payload = user.json()\n        account_id = user_payload.get(\"login\") or str(user_payload.get(\"id\") or \"\") or None","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/providers/github_copilot_provider.py#L125-L161","documentation":"Error \"GitHub device flow was denied.\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/providers/github_copilot_provider.py:143 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":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}