batch_mode_batch_triple/
process_error_file.rs1crate::ix!();
3
4impl BatchFileTriple {
5
6 pub async fn log_errors(&self, error_data: &BatchErrorData)
7 -> Result<(), BatchErrorProcessingError>
8 {
9 info!("logging possible errors in our BatchErrorData of len {}", error_data.len());
10
11 for response_record in error_data.responses() {
12 if let BatchResponseBody::Error(error_body) = response_record.response().body() {
13 let message = error_body.error().message();
14 let custom_id = response_record.custom_id().as_str();
15 println!("Error in request {}: {}", custom_id, message);
16 }
18 }
19 Ok(())
20 }
21
22 pub async fn retry_failed_requests(&self, error_data: &BatchErrorData)
23 -> Result<(), BatchErrorProcessingError>
24 {
25 let failed_requests = error_data.responses().iter().collect::<Vec<_>>();
27 Ok(())
30 }
31}