: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(wordpress): treat REST API 404 as non-retryable (#68121)
Tom Owers49bc75a0efba
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/source.pyindex eb7a07548051..38ccbc21b5b2 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/source.py@@ -96,6 +96,7 @@ To sync private content or authenticate, create an [Application Password](https:return {"401 Client Error": "Invalid WordPress username or application password. Create a new application password and reconnect.","403 Client Error": "Your WordPress credentials lack permission to read this data. Check the user's role and try again.",+ "404 Client Error": "WordPress returned 404 (Not Found) for this collection. The REST API or this specific endpoint (for example /users, which security plugins often block to prevent user enumeration) may be disabled or restricted on your site. Enable REST API access for it, or remove this table from the sync.",HOST_NOT_ALLOWED_ERROR: "The WordPress site URL is not allowed. Please use a publicly reachable site URL.",HTTP_NOT_ALLOWED_ERROR: "The WordPress site URL must use HTTPS when credentials are provided. Please update the site URL to use https://.",}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress_source.pyindex 4d4008f03095..2da71e875c77 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress_source.py@@ -51,7 +51,7 @@ class TestWordpressSource:assert pass_field.required is Falseassert pass_field.secret is True- @pytest.mark.parametrize("expected_key", ["401 Client Error", "403 Client Error"])+ @pytest.mark.parametrize("expected_key", ["401 Client Error", "403 Client Error", "404 Client Error"])def test_non_retryable_errors(self, expected_key):assert expected_key in self.source.get_non_retryable_errors()