diff --git a/openverse_catalog/dags/providers/provider_api_scripts/provider_data_ingester.py b/openverse_catalog/dags/providers/provider_api_scripts/provider_data_ingester.py index 19b83285b..edaf56fb6 100644 --- a/openverse_catalog/dags/providers/provider_api_scripts/provider_data_ingester.py +++ b/openverse_catalog/dags/providers/provider_api_scripts/provider_data_ingester.py @@ -237,8 +237,13 @@ def ingest_records(self, **kwargs) -> None: should_continue = False except AirflowException as error: - # AirflowExceptions should not be caught, as execution should not - # continue when the task is being stopped by Airflow. + # AirflowExceptions should not be caught or reraised as IngestionErrors, + # as execution should not continue when the task is being stopped by + # Airflow. However, we should still log the last query_params to be + # hit before the error was raised. + logger.info( + f"Last query_params used: {json.dumps(query_params, default=str)}" + ) # If errors have already been caught during processing, raise them # as well.