diff --git a/source-twilio/source_twilio/streams.py b/source-twilio/source_twilio/streams.py index b177a184f6..daee91db13 100644 --- a/source-twilio/source_twilio/streams.py +++ b/source-twilio/source_twilio/streams.py @@ -243,10 +243,13 @@ def read_records( if record[self.cursor_field] >= self.state.get(self.cursor_field, self._start_date): self._cursor_value = record[self.cursor_field] yield record - except HTTPError: + except HTTPError as err: # Catching errors similar to # {"code": 20404, "message": "The requested resource /2010-04-01/Accounts/XXX/Usage/Records.json was not found"} - pass + if err.response.json()["code"] == 20404: + pass + else: + raise err class TwilioNestedStream(TwilioStream):