Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(hubspot): explain a portal migration that outlasts the sync's retries (#123157)

Tom Owers1d44af4eb400
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py
index 687b6e34c909..85034c7ace70 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/source.py
@@ -261,6 +261,16 @@ class HubspotSource(ResumableSource[HubspotSourceConfig | HubspotSourceOldConfig
"Migration in progress",
}
+ def get_retry_exhausted_errors(self) -> dict[str, str]:
+ # HubSpot's own wording says "portal", which is its internal name for the account the customer
+ # connected, and does not say that the sync recovers by itself once the move finishes.
+ return {
+ "Migration in progress": (
+ "HubSpot is moving your account to another data center, so PostHog can't reach it right now. "
+ "This usually clears on its own and the next sync runs on schedule."
+ ),
+ }
+
# TODO: clean up hubspot job inputs to not have two auth config options
def parse_config(self, job_inputs: dict) -> HubspotSourceConfig | HubspotSourceOldConfig:
if "hubspot_integration_id" in job_inputs.keys():