: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(meta-ads): replace the raw meta response for an advantage+ creative rejection (#117632)
Tom Owers9a2085b4c656
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.pyindex 12f32e2c01ea..9406469838d7 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.py@@ -254,6 +254,14 @@ class MetaAdsSource(ResumableSource[MetaAdsSourceConfig, MetaAdsResumeConfig], O"Meta was too busy to return this table's data, so this sync run did not finish. ""This usually clears on its own and the next sync runs on schedule."),+ # Graph API code 100, subcode 2446211: Meta refuses to serve an Advantage+ creative+ # ("degrees of freedom") ad whose asset feed disagrees with its object story spec. The+ # raw 400 body lands in the stored error otherwise. Keyed on the subcode because Meta+ # localizes the title and message to the connected user's language.+ '"error_subcode":2446211': (+ "Meta refused to return an Advantage+ creative ad whose asset variations don't match "+ "its main creative. Fix that ad in Ads Manager; the next sync runs on schedule."+ ),}def get_schemas(diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/test_meta_ads.py b/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/test_meta_ads.pyindex 6554e69c72ed..0b40ac02241a 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/test_meta_ads.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/test_meta_ads.py@@ -1585,6 +1585,12 @@ class TestRetryableErrors:"fbtrace_id AaBbCcDdEeFf00112233)","too busy",),+ (+ 'Meta API request failed: 400 - {"error":{"message":"Invalid parameter","type":'+ '"OAuthException","code":100,"error_subcode":2446211,"is_transient":false,'+ '"fbtrace_id":"AaBbCcDdEeFf00112233"}}',+ "Advantage+ creative",+ ),],)def test_retry_exhausted_message_replaces_the_raw_meta_response(