Errors and warnings

The Display & Video 360 API can respond with a number of errors and warnings. A healthy API solution must handle these errors.

API errors

Requests to the API that fail to do the intended action return an error. Error responses should be caught and handled.

An API error response has an HTTP response code, an error message, and a Google RPC code status. It has the following format:

{
  "error": {
    "code": integer,
    "message": string,
    "status": enum (google.rpc.Code)
  }
}

The following is a list of common API errors and recommended actions:

Error codes
400 INVALID_ARGUMENT
There is an issue with your request. Review the message field in the error response and update your request accordingly.
401 UNAUTHENTICATED
Your request couldn't be properly authenticated. Verify that you are including valid OAuth credentials in your request. For more information, reference our Quickstart guide.
403 PERMISSION_DENIED
You don't have the permissions needed to complete the request. Verify that your user account has the proper permissions for the relevant partner or advertiser.
404 NOT_FOUND
The resource you are trying to retrieve can't be found. Verify that the ID you are using is correct and for the resource type being retrieved.
409 ABORTED
The resource you are trying to modify is being modified elsewhere. Wait a few seconds and then retry the request.
429 RESOURCE_EXHAUSTED
You have exceeded your rate limit or daily request quota. Use the Google Cloud console to examine your API usage. Update your workflow to perform within the existing quota limits. For more information, see our guide on Usage Optimization.
500 INTERNAL
The API experienced an internal error. Wait a few seconds and then retry the request. If the error persists, contact support.
504 DEADLINE_EXCEEDED
The API took too long to complete the request. Wait a few seconds and then retry the request. If the error persists, contact support.

SDF errors

The Display & Video 360 API uses long-running tasks to produce Structured Data Files (SDFs). Errors in creating the SDFs are returned in the finished operation. The error field will contain the details. See this truncated example:

{
  ...
  "done": true,
  "error": {
    "code": 3,
    "message": "We couldn't prepare your CSV files: Invalid filter Ids for Advertiser: 00000000"
  }
}

If the error message is not clear, we recommend the following:

  • Verify that your user has at least a Standard user role for the parent partner or advertiser.
  • Confirm that the IDs provided in the filter are accurate. The IDs must correspond to the intended resource type and must be child resources of the root id.
  • Make sure that your user has less than twenty concurrent SDF download tasks.

If you are still seeing errors, contact support.

Non-blocking Warnings

Non-blocking warnings indicate an issue that may impact a line item's ad serving. Similar warnings are seen in the UI. These warnings are passive and listed in the line item.

The root cause of a warning can impact the serving of a line item. In some cases it could prevent ad serving entirely.

Prevention

Some non-blocking warnings are caused by the misconfiguration of a line item:

  • Flight: A line item won't serve ads if its flight is invalid or if its insertion order's flight is expired. Make sure that a line item has a flight within that of its insertion order.
  • Assigned creatives: A line item can't serve if a valid creative isn't assigned to it.
  • Targeting: A line item's ad serving may be impacted or prevented altogether if its targeting isn't assigned correctly.

Make sure that an existing line item isn't generating any warnings before using its configurations in a new line item.

Monitoring

Non-blocking warnings can come up while a line item is in flight. Monitor your active line items for new warnings to make sure that they are serving correctly. Get line items in bulk with a list request. If a line item returns an unexpected warning, address the issue as soon as possible to reduce the impact to serving.

Warnings can be added even if settings or targeting haven't changed. Examples of this include:

  • The insertion order is paused or expires.
  • A user list or targeting option is deprecated.