{"record":{"id":"03a973cb1b624470","repo":"Hmbown/CodeWhale","slug":"opensandbox-returned-http","errorCode":null,"errorMessage":"OpenSandbox returned HTTP {}: {}","messagePattern":"OpenSandbox returned HTTP (.+?): (.+?)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/sandbox/opensandbox.rs","lineNumber":98,"sourceCode":"            cmd: cmd.to_string(),\n            env: env.clone(),\n        };\n\n        let mut req = self.client.post(self.run_url()).json(&request_body);\n\n        if let Some(ref api_key) = self.api_key {\n            req = req.bearer_auth(api_key);\n        }\n\n        let response = req\n            .send()\n            .await\n            .context(\"Failed to reach OpenSandbox endpoint\")?;\n\n        let status = response.status();\n        if !status.is_success() {\n            let body = response.text().await.unwrap_or_default();\n            anyhow::bail!(\"OpenSandbox returned HTTP {}: {}\", status.as_u16(), body);\n        }\n\n        let parsed: SandboxRunResponse = response\n            .json()\n            .await\n            .context(\"Failed to parse OpenSandbox response\")?;\n\n        Ok(SandboxOutput {\n            stdout: parsed.stdout,\n            stderr: parsed.stderr,\n            exit_code: parsed.exit_code,\n        })\n    }\n}\n","sourceCodeStart":80,"sourceCodeEnd":113,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/sandbox/opensandbox.rs#L80-L113","documentation":"OpenSandbox exec transport: the HTTP call to the sandbox run endpoint completed but returned a non-success status. The response body is fetched and embedded (possibly empty if unreadable), so the remote sandbox's own error text is surfaced to the caller.","triggerScenarios":"Thrown at crates/tui/src/sandbox/opensandbox.rs:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the status and body text for the sandbox's error","Check API key and endpoint configuration","Retry once transient server issues are ruled out"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}