: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): say what to do when the site refuses a read (#103562)
Tom Owers9edb00400601
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress.py b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress.pyindex 9c30a180979f..cda20b742afb 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/tests/test_wordpress.py@@ -282,7 +282,7 @@ class TestValidateCredentials:[(200, True, None),(401, False, "Invalid WordPress username or application password"),- (403, False, "lack permission"),+ (403, False, "lack permission to read this site. Check the user's role"),(404, False, "REST API not found"),],)diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/wordpress.py b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/wordpress.pyindex 36486269cffb..a7754f6386ad 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/wordpress.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/wordpress/wordpress.py@@ -277,7 +277,9 @@ def validate_credentials(return False, "Invalid WordPress username or application password"if response.status_code == 403:- return False, "These credentials lack permission to read this WordPress site"+ return False, (+ "Your WordPress credentials lack permission to read this site. Check the user's role and try again."+ )if response.status_code == 404:return False, "WordPress REST API not found at this URL — confirm the site URL and that the REST API is enabled"