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.

feat(data-warehouse): mark DoIt "Report no longer exists" as non-retryable (#60816)

Tom Owersc1b78f7b95fb
diff --git a/posthog/temporal/data_imports/sources/doit/source.py b/posthog/temporal/data_imports/sources/doit/source.py
index 15bc640c77e1..275759279b3d 100644
--- a/posthog/temporal/data_imports/sources/doit/source.py
+++ b/posthog/temporal/data_imports/sources/doit/source.py
@@ -49,6 +49,11 @@ class DoItSource(SimpleSource[DoItSourceConfig]):
return schemas
+ def get_non_retryable_errors(self) -> dict[str, str | None]:
+ return {
+ "Report no longer exists": "The DoIt report no longer exists. It may have been deleted or renamed in DoIt. Please reconnect the source or select a different report.",
+ }
+
def source_for_pipeline(self, config: DoItSourceConfig, inputs: SourceInputs) -> SourceResponse:
return doit_source(
config,
diff --git a/posthog/temporal/data_imports/sources/doit/tests/test_doit_source.py b/posthog/temporal/data_imports/sources/doit/tests/test_doit_source.py
new file mode 100644
index 000000000000..fa3a0314e254
--- /dev/null
+++ b/posthog/temporal/data_imports/sources/doit/tests/test_doit_source.py
@@ -0,0 +1,19 @@
+import pytest
+
+from posthog.temporal.data_imports.sources.doit.source import DoItSource
+
+from products.data_warehouse.backend.types import ExternalDataSourceType
+
+
+class TestDoItSource:
+ def setup_method(self):
+ self.source = DoItSource()
+
+ def test_source_type(self):
+ assert self.source.source_type == ExternalDataSourceType.DOIT
+
+ @pytest.mark.parametrize("pattern", ["Report no longer exists"])
+ def test_non_retryable_errors_includes_pattern(self, pattern):
+ errors = self.source.get_non_retryable_errors()
+
+ assert pattern in errors