{"record":{"id":"3a361e5da9dc8b52","repo":"Hmbown/CodeWhale","slug":"detail","errorCode":null,"errorMessage":"{}: {detail}","messagePattern":"\\{\\}: \\{detail\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":904,"sourceCode":"                // `lane status --json <bad-id> | jq` succeed where it used to\n                // fail. Stay silent and let the bail! below set the exit code.\n                None if receipt.is_error() => {}\n                None => println!(\"{}\", serde_json::to_string_pretty(receipt)?),\n            },\n            _ => println!(\"{}\", serde_json::to_string_pretty(receipt)?),\n        }\n    } else if receipt.is_error() {\n        eprintln!(\"{}\", receipt.render());\n    } else {\n        println!(\"{}\", receipt.render());\n    }\n    if receipt.is_error() {\n        let detail = receipt\n            .failure\n            .as_ref()\n            .map(ToString::to_string)\n            .unwrap_or_else(|| receipt.outcome.as_str().to_string());\n        bail!(\"{}: {detail}\", receipt.operation_id);\n    }\n    Ok(())\n}\n\nfn run_lane_control(\n    operation: codewhale_lane::ControlOperation,\n    lane_id: Option<&str>,\n    json: bool,\n) -> Result<()> {\n    let receipt = codewhale_lane::control::execute_lane_control(\n        codewhale_lane::ControlSurface::Cli,\n        operation,\n        lane_id,\n    );\n    emit_control_receipt(&receipt, json)\n}\n\nfn run_lane_command(args: LaneArgs) -> Result<()> {","sourceCodeStart":886,"sourceCodeEnd":922,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L886-L922","documentation":"After running a lane operation, this check converts an error receipt into a Rust error: if `receipt.is_error()`, it fails with `<operation_id>: <detail>`, where detail is the receipt's `failure` string or, failing that, its raw outcome string. It is the generic propagation point for any failed lane backend operation (create, reconcile, control, etc.).","triggerScenarios":"Any lane operation whose receipt comes back as an error — backend failure during lane creation/reconciliation/control, an operation id whose execution failed, or a receipt with no `failure` detail but an error outcome string.","commonSituations":"Underlying tmux/git/lane-runtime failures bubbling up; stale lane state that fails reconciliation; a lane operation invoked twice and rejected on the second run.","solutions":["Read the `<detail>` after the operation id — it carries the underlying backend failure — and fix that root cause.","Re-run the lane operation after repairing state (e.g. `codewhale lane --status` / reconcile).","If the detail is just the outcome string (no failure text), enable verbose logging or inspect lane state files for the real cause."],"exampleFix":"// before: lane op fails with `op-42: tmux session missing`\ncodewhale lane control resume op-42\n// after: reconcile/repair first, then retry\ncodewhale lane --status\ncodewhale lane control resume op-42","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match codewhale::run_lane_op(op) {\n    Err(e) => {\n        let (op_id, detail) = parse_receipt_error(&e.to_string());\n        eprintln!(\"lane op {op_id} failed: {detail}\");\n        // inspect/repair then retry\n    }\n    Ok(v) => v,\n}","preventionTips":["Check lane status before issuing control operations.","Handle the `op-id: detail` message format to extract root causes programmatically."],"tags":["lane","backend","operation-failure"],"backgroundTag":"operation-not-supported","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}