diff --git a/tap_hubspot_beta/streams.py b/tap_hubspot_beta/streams.py index 06a972c..7e23d58 100644 --- a/tap_hubspot_beta/streams.py +++ b/tap_hubspot_beta/streams.py @@ -5,6 +5,7 @@ from singer_sdk.exceptions import InvalidStreamSortException from singer_sdk.helpers.jsonpath import extract_jsonpath +from singer_sdk.exceptions import FatalAPIError import requests from backports.cached_property import cached_property @@ -647,7 +648,11 @@ def schema(self) -> dict: # Init request session self._requests_session = requests.Session() # Get the data from Hubspot - records = self.request_records(dict()) + try: + records = self.request_records(dict()) + except FatalAPIError: + self.logger.warning("Failed to run discover on dynamic stream ContactListsStream properties.") + records = [] properties = [] property_names = set() @@ -1158,4 +1163,4 @@ class AssociationQuotesDealsStream(AssociationDealsStream): """Association Quotes -> Deals Stream""" name = "associations_quotes_deals" - path = "crm/v4/associations/deals/quotes/batch/read" \ No newline at end of file + path = "crm/v4/associations/deals/quotes/batch/read"