You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit db8b9b8
Browse filesBrowse the repository at this point in the historyBrowse files
fix(targeting): accept custom_locations/places/electoral_districts in estimate_audience_size preflight check (#147)
The preflight validator in estimate_audience_size only recognized
countries/regions/cities/zips/geo_markets/country_groups as valid
geo_locations keys. A targeting spec using radius-based custom_locations
(or the less common places/electoral_districts keys) was rejected with
Missing target audience location before ever reaching Meta's
reachestimate endpoint, even though create_adset/update_adset already
accept and persist custom_locations correctly.
Adds custom_locations, places, and electoral_districts to the recognized
key list and updates the corresponding error messages. Adds regression
tests covering each newly-accepted key plus a still-rejected case with
no location at all.
"details": "Select at least one location in targeting.geo_locations or include a custom audience.",
190
-
"action_required": "Add geo_locations with countries/regions/cities/zips or include custom_audiences.",
193
+
"action_required": "Add geo_locations with countries/regions/cities/zips/geo_markets/custom_locations/places/electoral_districts, or include custom_audiences.",
"details": raw_err.get("error_user_msg") or"Select at least one location, or choose a custom audience.",
226
229
"endpoint_used": f"{account_id}/reachestimate",
227
-
"action_required": "Add geo_locations with at least one of countries/regions/cities/zips or include custom_audiences.",
230
+
"action_required": "Add geo_locations with at least one of countries/regions/cities/zips/geo_markets/custom_locations/places/electoral_districts or include custom_audiences.",
0 commit comments