: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(webflow): stop retrying a deterministic 406 on collection discovery (#88830)
Tom Owers926918282318
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/source.pyindex c162e5f70982..a5e4f490f2d7 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/source.py@@ -87,6 +87,12 @@ class WebflowSource(# the site has unpublished changes. Both are deterministic state/config issues# that retrying can't resolve, so stop retrying and tell the user how to fix it."409 Client Error: Conflict": "Webflow returned a 409 Conflict. For the Products and Orders tables this means the connected site does not have ecommerce enabled — enable ecommerce in Webflow or remove those tables from the sync. For other resources it can mean the site has unpublished changes; publish your Webflow site, then try again.",+ # Webflow returns 406 deterministically for a given site/token — every retry of the+ # same request fails identically, so it's a site-side rejection retrying can't fix+ # rather than a transient content-negotiation blip. Webflow doesn't document the+ # exact cause; it's commonly reported when the connected site's plan doesn't include+ # CMS API access. Match the stable status text, not the URL.+ "406 Client Error": "Webflow rejected this request with a 406 Not Acceptable error. This usually means the connected site isn't eligible for the requested resource — for example, CMS collections require a Webflow site plan with CMS access. Check your Webflow site's plan and settings, then try again.",# A CMS collection discovered when the table was set up can later be deleted or have its# slug renamed in Webflow, so at sync time the slug no longer resolves to a collection.# That's a deterministic upstream state change retrying can't fix. Match the stablediff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/tests/test_webflow_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/tests/test_webflow_source.pyindex 6871a4a0c3b1..d40dc475993f 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/tests/test_webflow_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/webflow/tests/test_webflow_source.py@@ -48,6 +48,18 @@ class TestWebflowSource:matches = [pattern for pattern in errors if pattern in raised_message]assert matches == ["409 Client Error: Conflict"]+ def test_406_not_acceptable_message_is_recognised_as_non_retryable(self) -> None:+ # Webflow returns 406 deterministically for a given site/token when listing CMS+ # collections; the raised HTTPError message embeds a volatile site id and URL, so we+ # must match on a stable substring that excludes them.+ errors = WebflowSource().get_non_retryable_errors()+ raised_message = (+ "406 Client Error: Not Acceptable for url: "+ "https://api.webflow.com/v2/sites/64cd40ea6c8cca864c510895/collections"+ )+ matches = [pattern for pattern in errors if pattern in raised_message]+ assert matches == ["406 Client Error"]+def test_deleted_collection_message_is_recognised_as_non_retryable(self) -> None:# _resolve_collection_id raises this when a collection's slug no longer resolves at sync# time; the message embeds a volatile schema name and site id, so we must match on a stable