From ae6dcce33ed211fd8bdaca0e0a4d963f80c96635 Mon Sep 17 00:00:00 2001 From: Andrei Markin Date: Wed, 7 Jun 2023 18:42:50 +0400 Subject: [PATCH] [gaarf-py] Re-raise InternalServer error when failed to get data from API Change-Id: I23e245be4eebcfeb67b6c8a45f24682853db4c60 --- py/gaarf/query_executor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/py/gaarf/query_executor.py b/py/gaarf/query_executor.py index 17e3f42c..42cec048 100644 --- a/py/gaarf/query_executor.py +++ b/py/gaarf/query_executor.py @@ -140,6 +140,7 @@ def _parse_ads_response( logger.error("Cannot fetch data from API for query '%s' %d times", query_specification.query_title, retry_failure.last_attempt.attempt_number) + raise exceptions.InternalServerError if optimize_strategy in (OptimizeStrategy.BATCH, OptimizeStrategy.BATCH_PROTOBUF): logger.warning("Running gaarf in an optimized mode")