diff --git a/infrastructure/hubspot/deal_properties_client.py b/infrastructure/hubspot/deal_properties_client.py index 1564b22de..3893c795b 100644 --- a/infrastructure/hubspot/deal_properties_client.py +++ b/infrastructure/hubspot/deal_properties_client.py @@ -5,6 +5,7 @@ from hubspot.client import Client # type: ignore[reportMissingTypeStubs] from hubspot.crm.deals import SimplePublicObjectInput # type: ignore[reportMissingTypeStubs] from infrastructure.hubspot.errors import HubspotRequestError +from infrastructure.hubspot.retry import call_with_retry def _scrubbed(error: Exception) -> HubspotRequestError: @@ -51,11 +52,13 @@ class HubspotDealPropertiesClient: self, deal_id: str, property_name: str, value: str ) -> None: try: - self._client.crm.deals.basic_api.update( # type: ignore[reportUnknownMemberType] - deal_id, - simple_public_object_input=SimplePublicObjectInput( - properties={property_name: value} - ), + call_with_retry( + lambda: self._client.crm.deals.basic_api.update( # type: ignore[reportUnknownMemberType] + deal_id, + simple_public_object_input=SimplePublicObjectInput( + properties={property_name: value} + ), + ) ) except Exception as error: # `from None` keeps the body-carrying SDK error out of tracebacks.