Query and change errors
For AI assistants and the curious. What to do when Google rejects a query or a change, by code — UNRECOGNIZED_FIELD, EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE, PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE, METRIC_ACCESS_DENIED, START_DATE_TOO_OLD, TOO_LONG, POLICY_ERROR, RESOURCE_LIMIT, CONCURRENT_MODIFICATION — plus a wrong parameter name and Analytics fields that can't be combined.
Most of these mean the call was built wrong, so the assistant fixes the call itself and runs it once more. There is nothing for you to do unless the entry says so. A refused query reads nothing and changes nothing.
Google's query errors arrive as
Google Ads rejected the query: <category> <CODE> at <field>: <Google's message>.
Match on the code in capitals.
UNRECOGNIZED_FIELD
What you see.
Google Ads rejected the query: query_error UNRECOGNIZED_FIELD: … Call get_resource_metadata with the resource name for the fields it can select, filter and sort by; field names are written in full, e.g. 'campaign.id'.
Why it happens. A field name in fields, conditions or orderings is
not one Google knows for that resource.
Fix (assistant).
- Call
get_resource_metadatawith the resource name. It lists the fields the resource can select, filter and sort by, and does not count against the daily operations. - Use a listed field, written in full (
campaign.id, notid). - Run the query once more.
If it persists. Pick another resource that carries the data, or tell the user what could not be read.
EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE
What you see. query_error EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE.
Why it happens. Google requires a field used in orderings, and a
segment other than the date used in conditions, to be in fields too.
Fix (assistant). Add that field to fields and run the query once more.
If it persists. Check the field names with get_resource_metadata.
PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE
What you see. PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE, or another
code that starts with PROHIBITED_.
Why it happens. That metric or segment cannot be read with this resource, or with another field in the same query.
Fix (assistant).
- Remove the field Google names.
- If you need it, query a resource that carries it;
get_resource_metadatashows what each resource can select. - Run once more.
If it persists. Split the question into two queries.
METRIC_ACCESS_DENIED
What you see. METRIC_ACCESS_DENIED.
Why it happens. Google does not let this account read that metric.
Fix (assistant). Drop the metric and run once more. Tell the user which figure is not available, rather than estimating it.
START_DATE_TOO_OLD
What you see. START_DATE_TOO_OLD, usually on change_event or
change_status.
Why it happens. Google keeps change history for a limited time: about the
last 30 days for change_event and 90 days for change_status.
Fix (assistant). Use a later start_date, inside that window, and run
once more. Tell the user that older changes are not available through
AdCopilot.
"… does not take the parameter …"
What you see.
search does not take the parameter
query, so nothing was run. Its parameters are: …
On the Tool calls page the reason reads unknown argument.
Why it happens. The call used a parameter name the tool does not have.
AdCopilot refuses it rather than run the tool without it. For search, the
message adds how the query is built: the resource in resource, the selected
fields in fields, each filter in conditions, the order in orderings,
the row cap in limit, and the dates in start_date and end_date.
Fix (assistant). Call again with only the parameter names the message lists. Nothing ran, so nothing needs undoing.
Never add a manager account ID. AdCopilot refuses it and reaches an account under a manager through that manager by itself, once the account is switched on under Your accounts.
"image_source must be …"
What you see.
image_source must be an http:// or https:// address of the image, or the image itself as a data: URI (data:image/png;base64,...). This connector cannot read files, so nothing was uploaded.
Fix (assistant). Pass the image's web address, or the image itself as a
data: URI. A file path on your computer cannot be read.
Analytics: "Selected dimensions and metrics cannot be queried together"
What you see. An Analytics report fails with HttpError 400 and
"Selected dimensions and metrics cannot be queried together".
Why it happens. Google Analytics does not combine those dimensions and metrics in one report.
Fix (assistant).
- Call
ga4_get_metadatafor the property to see its dimensions and metrics. - Remove the dimension or metric that doesn't fit, or split the report in two.
- Run once more.
TOO_LONG
What you see. TOO_LONG, with the field it is about, for example a
headline or a description.
Why it happens. A text is longer than Google allows for that field. Google's limits include 30 characters for a responsive search ad headline, 90 for a description, 15 for each display path, and 25 for sitelink text and for a callout.
Fix (assistant).
- Shorten the text Google names to its limit.
- Show the user the new text. It is a new change, so ask for it as one.
- Run once more.
POLICY_ERROR
What you see. POLICY_ERROR, or a policy finding, with Google's
message naming the policy.
Why it happens. Google's ad policies refused the text, for example a word, a claim or a symbol.
Fix.
- The assistant tells the user which policy Google named.
- Reword the text without what Google flagged, and propose it again.
- AdCopilot cannot ask Google for a policy exception. If you think Google is wrong, that is done in Google Ads.
RESOURCE_LIMIT
What you see. RESOURCE_LIMIT.
Why it happens. The account, campaign or ad group already holds as many of that kind of item as Google allows.
Fix.
- The assistant tells the user; repeating the call gives the same answer.
- Pause or reuse an existing item instead of adding another, or remove one in Google Ads.
CONCURRENT_MODIFICATION
What you see. CONCURRENT_MODIFICATION.
Why it happens. Something else changed the same item at the same moment: another person, a Google Ads rule, or another call.
Fix (assistant). Wait a few seconds, read the item again, and try the change once more if it is still needed.
Any other Google error
What you see. "Google Ads rejected the query: …" with another code, or,
for a change, Google's raw GoogleAdsException with an error_code and a
message.
Fix (assistant).
- Read the code and Google's message: they name the field and the rule.
- Fix the call and run it once more.
- If the same error comes back, stop and tell the user Google's message.
- Before repeating a change, read the item back: a call that makes several changes can stop partway.
If it persists. The user can write to [email protected] with the error text and what was asked for.
Teammate problems
Calls to one account fail for one person (USER_PERMISSION_DENIED), a product connected through a teammate's Google login, a teammate who cannot make changes or switch accounts on, and a teammate whose access stopped.
Busy, slow or rate-limited
AdCopilot's shared daily Google Ads limit, "Google Ads is busy", Google's RESOURCE_EXHAUSTED, keyword planning's one-request-per-second rule, "too many requests" (HTTP 429), and Google's 502 or 500 errors. None is your plan's daily cap, and none is fixed by changing a setting.