{"record":{"id":"1e4aaaa1ad7d8ddb","repo":"zed-industries/zed","slug":"failed-to-retrieve-batch-results-for","errorCode":null,"errorMessage":"Failed to retrieve batch results for {}: {:?}","messagePattern":"Failed to retrieve batch results for (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/anthropic_client.rs","lineNumber":346,"sourceCode":"\n            if batch_status.processing_status != \"ended\" {\n                log::warn!(\n                    \"Batch {} is not finished (status: {}), skipping\",\n                    batch_id,\n                    batch_status.processing_status\n                );\n                continue;\n            }\n\n            let results = anthropic::batches::retrieve_batch_results(\n                self.http_client.as_ref(),\n                ANTHROPIC_API_URL,\n                &self.api_key,\n                batch_id,\n            )\n            .await\n            .map_err(|e| {\n                anyhow::anyhow!(\"Failed to retrieve batch results for {}: {:?}\", batch_id, e)\n            })?;\n\n            let mut updates: Vec<(String, String, String)> = Vec::new();\n            let mut success_count = 0;\n            let mut error_count = 0;\n\n            for result in results {\n                let request_hash = result\n                    .custom_id\n                    .strip_prefix(\"req_hash_\")\n                    .unwrap_or(&result.custom_id)\n                    .to_string();\n\n                match result.result {\n                    anthropic::batches::BatchResult::Succeeded { message } => {\n                        let response_json = serde_json::to_string(&message)?;\n                        updates.push((request_hash, response_json, batch_id.clone()));\n                        success_count += 1;","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/anthropic_client.rs#L328-L364","documentation":"import_batches finished retrieving a batch whose status is 'ended', then fetching its results file failed; the message names the batch and the wrapped retrieval error. The batch exists but its output could not be downloaded.","triggerScenarios":"Thrown at crates/edit_prediction_cli/src/anthropic_client.rs:346 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the results download; expired result files may require re-submitting the batch","Check the wrapped error for auth/network causes"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}