|
48 | 48 | from pds.ingress.util.report_util import read_manifest_file |
49 | 49 | from pds.ingress.util.report_util import update_summary_table |
50 | 50 | from pds.ingress.util.report_util import write_manifest_file |
51 | | -from requests.exceptions import RequestException |
52 | 51 | from tqdm.utils import CallbackIOWrapper |
53 | 52 |
|
54 | 53 | BEARER_TOKEN = None |
@@ -191,20 +190,17 @@ def _process_batch(batch_index, request_batch, node_id, force_overwrite, api_gat |
191 | 190 | ingress_file_to_s3(ingress_response, batch_index, batch_pbar) |
192 | 191 |
|
193 | 192 | batch_pbar.update() |
194 | | - except RequestException as err: |
| 193 | + except Exception as err: |
195 | 194 | # If here, the HTTP request error was unrecoverable by a backoff/retry |
196 | 195 | trimmed_path = ingress_response.get("trimmed_path") |
197 | 196 | ingress_path = ingress_response.get("ingress_path") |
198 | 197 | update_summary_table(SUMMARY_TABLE, "failed", ingress_path) |
199 | 198 |
|
200 | | - logger.error( |
201 | | - "Batch %d : Ingress failed for %s, HTTP code: %s\n HTTP response text:\n%s", |
202 | | - batch_index, |
203 | | - trimmed_path, |
204 | | - str(err.response.status_code) if err.response else "None", |
205 | | - err.response.text if err.response else "None", |
206 | | - ) |
| 199 | + logger.error("Batch %d : Ingress failed for %s, Reason:\n%s", batch_index, trimmed_path, str(err)) |
| 200 | + |
| 201 | + continue # Move to next file in the batch |
207 | 202 | except Exception as err: |
| 203 | + # Hit an unrecoverable error while processing the batch |
208 | 204 | logger.error("Ingress failed, reason: %s", str(err)) |
209 | 205 | raise |
210 | 206 | finally: |
|
0 commit comments