{"record":{"id":"a7012688b03b8cbc","repo":"Hmbown/CodeWhale","slug":"turn-canceled","errorCode":null,"errorMessage":"turn canceled","messagePattern":"turn canceled","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/app-server/src/lib.rs","lineNumber":1252,"sourceCode":"                \"thread\": Value::Null,\n                \"threads\": [],\n                \"model\": Value::Null,\n                \"model_provider\": Value::Null,\n                \"cwd\": Value::Null,\n                \"approval_policy\": Value::Null,\n                \"sandbox\": Value::Null,\n                \"events\": [],\n                \"data\": { \"turn_id\": turn_id },\n            })),\n            TurnTerminalStatus::Failed => Err(anyhow!(\n                \"{}\",\n                error.unwrap_or_else(|| \"turn failed\".to_string())\n            )),\n            TurnTerminalStatus::Interrupted => Err(anyhow!(\n                \"{}\",\n                error.unwrap_or_else(|| \"turn interrupted\".to_string())\n            )),\n            TurnTerminalStatus::Canceled => Err(anyhow!(\n                \"{}\",\n                error.unwrap_or_else(|| \"turn canceled\".to_string())\n            )),\n        }\n    }\n\n    async fn stream_turn_events<W: AsyncWrite + Unpin>(\n        &self,\n        thread_id: &str,\n        turn_id: &str,\n        response_id: &str,\n        writer: &mut W,\n        since_seq: u64,\n    ) -> Result<(u64, TurnTerminalStatus, Option<String>)> {\n        let mut response = self\n            .authed(self.client.get(format!(\n                \"{}/v1/threads/{thread_id}/events?since_seq={since_seq}\",\n                self.base_url","sourceCodeStart":1234,"sourceCodeEnd":1270,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/app-server/src/lib.rs#L1234-L1270","documentation":"Sentinel default for a turn that terminated with TurnTerminalStatus::Canceled and no error detail from the runtime. The turn was explicitly canceled (as opposed to failing), and the empty error field means the cancellation reason must come from the caller or logs.","triggerScenarios":"Thrown at crates/app-server/src/lib.rs:1252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm whether you or a client intentionally canceled the turn; if so this is expected","If unintended, find which component sent the cancel and stop it","Re-issue the turn once the cancellation source is resolved","Check runtime logs for the cancellation origin"],"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"}