{"record":{"id":"c0130fffd8ace8e8","repo":"xai-org/grok-build","slug":"operation-failed-status-body","errorCode":null,"errorMessage":"{operation} failed: {status} - {body}","messagePattern":"(.+?) failed: (.+?) - (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-shell/src/remote/agent.rs","lineNumber":96,"sourceCode":"                crate::http::process_client_identifier(),\n            )\n            .header(\n                crate::http::CLIENT_MODE_HEADER,\n                crate::http::process_client_mode(),\n            );\n\n        Ok(xai_file_utils::trace_context::inject_trace_context_into_request(builder))\n    }\n\n    /// Check an HTTP response for errors, then deserialize the JSON body.\n    async fn parse_response<T: DeserializeOwned>(\n        response: reqwest::Response,\n        operation: &str,\n    ) -> Result<T> {\n        if !response.status().is_success() {\n            let status = response.status().as_u16();\n            let body = response.text().await.unwrap_or_default();\n            bail!(\"{operation} failed: {status} - {body}\");\n        }\n        response\n            .json()\n            .await\n            .with_context(|| format!(\"failed to parse {operation} response\"))\n    }\n\n    /// Check an HTTP response for errors, discarding the body.\n    async fn check_response(response: reqwest::Response, operation: &str) -> Result<()> {\n        if !response.status().is_success() {\n            let status = response.status().as_u16();\n            let body = response.text().await.unwrap_or_default();\n            bail!(\"{operation} failed: {status} - {body}\");\n        }\n        Ok(())\n    }\n\n    /// Fork an existing sandbox session.","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-shell/src/remote/agent.rs#L78-L114","documentation":"Error \"{operation} failed: {status} - {body}\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-grok-shell/src/remote/agent.rs:96 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":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}