Page Summary
-
Asynchronous operations within
ExperimentServicehandle errors differently than synchronous operations. -
ExperimentService.ScheduleExperimentandExperimentService.PromoteExperimentare asynchronous operations using this error reporting mechanism. -
Asynchronous operations return a longrunning operation which indicates the status and presence of errors upon completion.
-
Specific errors for these operations are retrieved using
ExperimentService.ListExperimentAsyncErrorsrather than being included in the longrunning operation.
Because ExperimentService includes several asynchronous
operations, the mechanism for fetching errors related to these operations
differs from synchronous operations.
Affected operations
The asynchronous operations that use this error reporting mechanism are:
How long-running operations handle errors
For these methods, the API returns a long-running operation
(google.longrunning.Operation) that you can poll to check the status of the
asynchronous execution. When the operation completes (done = true), the
google.longrunning.Operation populates either response (with
google.protobuf.Empty when successful) or error (with a google.rpc.Status
summary if any asynchronous errors occurred).
If the full list of errors were returned directly in the long-running operation
payload, errors could be missed if polling stops early, and the response payload
could become excessively large for a polling request. Instead, the error field
on the long-running operation indicates that errors occurred, and you retrieve
the detailed Status errors from a dedicated pagination endpoint.
Fetch asynchronous errors
To retrieve the full list of errors for an experiment's long-running operation,
call
ExperimentService.ListExperimentAsyncErrors.
Pass the resource name of the experiment (resource_name) and an optional
page_size, then page through the returned Status entries using page_token
as you would for any other Google Ads API list request:
GET https://googleads.googleapis.com/v25/customers/CUSTOMER_ID/experiments/EXPERIMENT_ID:listExperimentAsyncErrors?pageSize=100