From eef01ef9c1c6956f0446f032c17ff8987498eb9b Mon Sep 17 00:00:00 2001 From: Alex Bair Date: Mon, 4 Nov 2024 09:47:55 -0500 Subject: [PATCH] source-klaviyo: raise errors for `Profiles` and `GlobalExclusions` The `raise_on_http_errors` property has been suppressing errors for the `Profiles` and `GlobalExclusions` streams. It looks like this was originally done because Klaviyo sometimes returns a `503` when paginating per Airbyte comments. I have not been able to replicate that. If that does happen, we should now get an error message, the shard should fail & restart, and the stream should pick up where it last left off paginating. --- source-klaviyo/source_klaviyo/streams.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/source-klaviyo/source_klaviyo/streams.py b/source-klaviyo/source_klaviyo/streams.py index ed6c9801b..aa377e9d0 100644 --- a/source-klaviyo/source_klaviyo/streams.py +++ b/source-klaviyo/source_klaviyo/streams.py @@ -37,17 +37,6 @@ def availability_strategy(self) -> Optional[AvailabilityStrategy]: return KlaviyoAvailabilityStrategy() - @property - def raise_on_http_errors(self) -> bool: - # Profiles and Global Exclusions Stream - # raise a 503 response when paginating. Ignoring - # raises and retries on both - if self.name == "profiles" or self.name == "global_exclusions": - return False - else: - return True - - def should_retry(self, response) -> bool: if self.name == "profiles" or self.name == "global_exclusions": return response.status_code == 429 or response.status_code == 500 or 503 < response.status_code < 600