Skip to content

Commit

Permalink
source-klaviyo: raise errors for Profiles and GlobalExclusions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Alex-Bair committed Nov 4, 2024
1 parent 2fbd9b0 commit eef01ef
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions source-klaviyo/source_klaviyo/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eef01ef

Please sign in to comment.