{"record":{"id":"4c6415d27d3707ec","repo":"openai/codex","slug":"io-errorkind-invaliddata-4c6415","errorCode":"io::ErrorKind::InvalidData","errorMessage":"failed to parse remote control pairing response from `{}`: HTTP {status}, {}, body: {body_preview}, expires_at parse error: {err}","messagePattern":"failed to parse remote control pairing response from `(.+?)`: HTTP (.+?), (.+?), body: (.+?), expires_at parse error: (.+?)","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-transport/src/transport/remote_control/enroll.rs","lineNumber":124,"sourceCode":"                ))\n            },\n        )?;\n        let StartRemoteControlPairingResponse {\n            pairing_code,\n            manual_pairing_code,\n            server_id,\n            environment_id,\n            expires_at,\n        } = pairing;\n        if server_id != self.server_id || environment_id != self.environment_id {\n            return Err(io::Error::other(format!(\n                \"remote control pairing returned mismatched enrollment: expected server_id={}, environment_id={}; got server_id={}, environment_id={}\",\n                self.server_id, self.environment_id, server_id, environment_id\n            )));\n        }\n        let expires_at = OffsetDateTime::parse(&expires_at, &Rfc3339)\n            .map_err(|err| {\n                io::Error::new(\n                    ErrorKind::InvalidData,\n                    format!(\n                        \"failed to parse remote control pairing response from `{}`: HTTP {status}, {}, body: {body_preview}, expires_at parse error: {err}\",\n                        self.remote_control_target.pair_url,\n                        format_headers(&headers)\n                    ),\n                )\n            })?\n            .unix_timestamp();\n\n        Ok(RemoteControlPairingStartResponse {\n            pairing_code,\n            manual_pairing_code,\n            environment_id,\n            expires_at,\n        })\n    }\n","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-transport/src/transport/remote_control/enroll.rs#L106-L142","documentation":"Response validation error in start_pairing: the pairing response body parsed, but the expires_at field could not be converted into the expected timestamp type. The message preserves the HTTP status, body preview, and the underlying parse error, indicating the remote service returned an unexpected datetime format or value.","triggerScenarios":"Thrown at codex-rs/app-server-transport/src/transport/remote_control/enroll.rs:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log the raw expires_at value and verify it against the pairing API contract (RFC3339 vs Unix seconds).","Make the field leniently parsed or optional, treating unknown expiry as no expiry.","Retry the pairing request in case of a transient malformed response."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}