From 9ba955dcc3a780e01bce80b5da33e4b291b126ed Mon Sep 17 00:00:00 2001 From: Denys Davydov Date: Sat, 20 Aug 2022 10:37:15 +0300 Subject: [PATCH] source fb-marketing: add comment (#15812) --- .../source_facebook_marketing/streams/async_job.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/async_job.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/async_job.py index dca8551dce30..4db8093c3318 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/async_job.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/async_job.py @@ -22,6 +22,11 @@ logger = logging.getLogger("airbyte") +# `FacebookBadObjectError` occurs in FB SDK when it fetches an inconsistent or corrupted data. +# It still has http status 200 but the object can not be constructed from what was fetched from API. +# Also, it does not happen while making a call to the API, but later - when parsing the result, +# that's why a retry is added to `get_results()` instead of extending the existing retry of `api.call()` with `FacebookBadObjectError`. + backoff_policy = retry_pattern(backoff.expo, FacebookBadObjectError, max_tries=5, factor=5)