{"record":{"id":"7b2b5c9131998864","repo":"openai/codex","slug":"method-url-failed-status-content-type-ct","errorCode":null,"errorMessage":"{method} {url} failed: {status}; content-type={ct}; body={body}","messagePattern":"(.+?) (.+?) failed: (.+?); content-type=(.+?); body=(.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/backend-client/src/client.rs","lineNumber":268,"sourceCode":"    }\n\n    async fn exec_request(\n        &self,\n        req: RouteAwareRequestBuilder,\n        method: &str,\n        url: &str,\n    ) -> Result<(String, String)> {\n        let res = req.send().await?;\n        let status = res.status();\n        let ct = res\n            .headers()\n            .get(CONTENT_TYPE)\n            .and_then(|v| v.to_str().ok())\n            .unwrap_or(\"\")\n            .to_string();\n        let body = res.text().await.unwrap_or_default();\n        if !status.is_success() {\n            anyhow::bail!(\"{method} {url} failed: {status}; content-type={ct}; body={body}\");\n        }\n        Ok((body, ct))\n    }\n\n    async fn exec_request_detailed(\n        &self,\n        req: RouteAwareRequestBuilder,\n        method: &str,\n        url: &str,\n    ) -> std::result::Result<(String, String), RequestError> {\n        let res = req.send().await.map_err(anyhow::Error::from)?;\n        let status = res.status();\n        let content_type = res\n            .headers()\n            .get(CONTENT_TYPE)\n            .and_then(|v| v.to_str().ok())\n            .unwrap_or(\"\")\n            .to_string();","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/backend-client/src/client.rs#L250-L286","documentation":"Error \"{method} {url} failed: {status}; content-type={ct}; body={body}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/backend-client/src/client.rs:268 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"}