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(data-imports): stop retrying a bad dataforseo language field (#117760)

Tom Owers5651d231c93c
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/source.py
index 3a8a739245bd..b49a5db36a76 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/source.py
@@ -146,6 +146,11 @@ Note: DataForSEO bills per API request, so syncing these tables consumes account
"DataForSEO API error [40203]": "Your DataForSEO daily spending limit was exceeded. Raise the limit in your DataForSEO account settings or wait for it to reset, then resync.",
# Raised by `source_for_pipeline`; the raw message already names the table and the fix.
"table is keyword-scoped. Add at least one keyword to the DataForSEO source": None,
+ "Invalid Field: 'language_name'": (
+ "DataForSEO did not recognize the language set on this source. Sync the free "
+ "locations_and_languages table to find a language name DataForSEO accepts, fix the "
+ "Language field, then resync."
+ ),
}
def get_retryable_errors(self) -> set[str]:
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/tests/test_dataforseo_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/tests/test_dataforseo_source.py
index 913711491617..37a0c6ce4335 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/tests/test_dataforseo_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/dataforseo/tests/test_dataforseo_source.py
@@ -179,6 +179,7 @@ class TestDataForSEOSource:
("body_low_balance", "DataForSEO API error [40210]"),
("body_blocked", "DataForSEO API error [40201]"),
("body_daily_limit", "DataForSEO API error [40203]"),
+ ("body_invalid_language", "Invalid Field: 'language_name'"),
]
)
def test_non_retryable_errors_cover_permanent_failures(self, _name: str, expected_key: str) -> None: