: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(delighted): treat 410 Gone as non-retryable (#67278)
Tom Owers58e55d49c6b5
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/source.pyindex c7929d802da9..4be5e7c8e820 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/source.py@@ -45,6 +45,10 @@ class DelightedSource(ResumableSource[DelightedSourceConfig, DelightedResumeConfreturn {"401 Client Error: Unauthorized for url: https://api.delighted.com": "Delighted authentication failed. Please check your API key.","403 Client Error: Forbidden for url: https://api.delighted.com": "Delighted denied access. Please check that your API key has access to this project.",+ # 410 Gone means the endpoint has been permanently retired — no amount of retrying will+ # bring it back. Match the host prefix, not the per-request path/`since`, so it covers+ # every endpoint the retired API answers this way.+ "410 Client Error: Gone for url: https://api.delighted.com": "The Delighted API is no longer available. Delighted has permanently retired this API, so this source can no longer sync data.",}@propertydiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/tests/test_delighted_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/tests/test_delighted_source.pyindex a72b4aecba57..125174920880 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/tests/test_delighted_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/delighted/tests/test_delighted_source.py@@ -47,9 +47,11 @@ class TestDelightedSource:["401 Client Error: Unauthorized for url: https://api.delighted.com/v1/survey_responses.json?per_page=100","403 Client Error: Forbidden for url: https://api.delighted.com/v1/people.json",+ # 410 Gone: the endpoint has been permanently retired, so retrying is futile.+ "410 Client Error: Gone for url: https://api.delighted.com/v1/bounces.json?per_page=100&since=1700000000",],)- def test_non_retryable_errors_match_auth_failures(self, observed_error):+ def test_non_retryable_errors_match_permanent_failures(self, observed_error):non_retryable_errors = self.source.get_non_retryable_errors()assert any(key in observed_error for key in non_retryable_errors)