: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(shopify): treat GraphQL access-denied as non-retryable (#63692)
Tom Owers616250073500
diff --git a/posthog/temporal/data_imports/sources/shopify/tests/test_non_retryable_errors.py b/posthog/temporal/data_imports/sources/shopify/tests/test_non_retryable_errors.pynew file mode 100644index 000000000000..8276028c8eb2--- /dev/null+++ b/posthog/temporal/data_imports/sources/shopify/tests/test_non_retryable_errors.py@@ -0,0 +1,32 @@+import pytest++from posthog.temporal.data_imports.sources.shopify.source import ShopifySource+++ "error_message",+ [+ "Shopify GraphQL error: Access denied for fulfillmentOrders field.",+ "Shopify GraphQL error: Access denied for markets field.",+ ],+)+def test_graphql_access_denied_is_non_retryable(error_message):+ patterns = ShopifySource().get_non_retryable_errors()+ assert any(pattern in error_message for pattern in patterns), (+ f"GraphQL access-denied error '{error_message}' should match a non-retryable pattern"+ )+++ "error_message",+ [+ "Shopify GraphQL error: Throttled",+ "Shopify: internal error from request 500 Internal Server Error",+ "Unexpected graphql response format in Shopify rows read. Keys: ['extensions']",+ ],+)+def test_transient_graphql_errors_stay_retryable(error_message):+ patterns = ShopifySource().get_non_retryable_errors()+ assert not any(pattern in error_message for pattern in patterns), (+ f"transient error '{error_message}' should remain retryable"+ )