{"record":{"id":"e2a2059d86bb16cf","repo":"openai/codex","slug":"notfound-e2a205","errorCode":"NotFound","errorMessage":"device code login is not enabled for this Codex server. Use the browser login or verify the server URL.","messagePattern":"device code login is not enabled for this Codex server\\. Use the browser login or verify the server URL\\.","errorType":"exception","errorClass":"io::Error","httpStatus":404,"severity":"error","filePath":"codex-rs/login/src/device_code_auth.rs","lineNumber":84,"sourceCode":"    client_id: &str,\n) -> std::io::Result<UserCodeResp> {\n    let url = format!(\"{auth_base_url}/deviceauth/usercode\");\n    let body = serde_json::to_string(&UserCodeReq {\n        client_id: client_id.to_string(),\n    })\n    .map_err(std::io::Error::other)?;\n    let resp = client\n        .post(url)\n        .header(\"Content-Type\", \"application/json\")\n        .body(body)\n        .send()\n        .await\n        .map_err(std::io::Error::other)?;\n\n    if !resp.status().is_success() {\n        let status = resp.status();\n        if status == StatusCode::NOT_FOUND {\n            return Err(io::Error::new(\n                io::ErrorKind::NotFound,\n                \"device code login is not enabled for this Codex server. Use the browser login or verify the server URL.\",\n            ));\n        }\n\n        return Err(std::io::Error::other(format!(\n            \"device code request failed with status {status}\"\n        )));\n    }\n\n    let body = resp.text().await.map_err(std::io::Error::other)?;\n    serde_json::from_str(&body).map_err(std::io::Error::other)\n}\n\n/// Poll token endpoint until a code is issued or timeout occurs.\nasync fn poll_for_token(\n    client: &HttpClient,\n    auth_base_url: &str,","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/login/src/device_code_auth.rs#L66-L102","documentation":"Error \"device code login is not enabled for this Codex server. Use the browser login or verify the server URL.\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/login/src/device_code_auth.rs:84 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":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}