: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(instagram): treat Meta's generic missing-object error as non-retryable (#122189)
Tom Owersd79894709f54
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/source.pyindex e1626c0a1080..52e5076cbe5d 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/source.py@@ -144,6 +144,13 @@ Connect your Instagram account, then pick the professional account you want to s"Integration not found": ("The Instagram connection for this source no longer exists. Reconnect your Instagram account."),+ # Meta's code 100 catch-all for a GET on a node the token can no longer reach — the+ # account was unlinked from its page, the post was deleted, or a permission was+ # revoked without tripping one of the auth/permission codes above.+ "does not exist, cannot be loaded due to missing permissions, or does not support this operation": (+ "Instagram could not find the account or content this sync needs. Reconnect your Instagram "+ "account and confirm it's still linked to the page you authorized."+ ),}def get_retryable_errors(self) -> set[str]:diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/tests/test_instagram_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/tests/test_instagram_source.pyindex 73b33afee9ab..2f75cb5ac59c 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/tests/test_instagram_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/instagram/tests/test_instagram_source.py@@ -97,6 +97,10 @@ class TestInstagramSource:f"{PERMISSION_ERROR_PREFIX}: status=400, code=10, message=Application does not have permission","Failed to refresh the Instagram connection","Integration not found: 7",+ "Instagram API error: status=400, code=100, message=Unsupported get request. Object with ID "+ "'17841400000000000' does not exist, cannot be loaded due to missing permissions, or does not "+ "support this operation. Please read the Graph API documentation at "+ "https://developers.facebook.com/docs/graph-api",],)def test_auth_and_scope_failures_stop_the_source_instead_of_retrying(self, observed_error: str) -> None: