Handle partial failures in Google Ads API batch mutate operations

domain: developers.google.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Set partial_failure to true in your MutateAsync or batch mutate request; this allows successful operations in the batch to be applied even when others fail.
  2. Check the top-level partial_failure_error field in the response; a non-null value indicates that at least one operation in the batch failed.
  3. Iterate over the mutate_operations results and examine each result's status; failed operations return an error in the result's error field, while successful ones return the resource name or ID.
  4. Decode the partial_failure_error using the GoogleAdsFailure proto to extract individual GoogleAdsError objects, each containing an error_code, message, and the operation_index identifying which input operation failed.
  5. Log the operation_index alongside the original request payload so you can identify and resubmit the failed items without re-processing successful ones.
  6. Do not retry the entire batch after a partial failure; extract only the failed operations by operation_index and submit them as a separate batch to avoid creating duplicates of already-successful operations.

Known gotchas

Related routes

run large-scale account mutations asynchronously via google ads api batchjobservice
developers.google.com/google-ads/api · 5 steps · unrated
Request a policy exemption for a responsive search ad (or other ad type) that failed Google Ads API mutation
developers.google.com/google-ads/api · 4 steps · unrated
Request a policy exemption for a keyword that failed Google Ads API mutation due to an exemptible policy violation
developers.google.com/google-ads/api · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans