type AdUnitCodeError (v202411)

  • The AdUnitCodeError lists errors associated with the AdUnit.adUnitCode, specifically detailing issues with the format and content of the code, such as invalid characters or reserved codes.

  • This service utilizes ApiError, which includes details like the field path, elements, trigger, and a string representation to describe errors.

  • The AdUnitCodeError has several enumeration reasons, outlining specific error types like INVALID_CHARACTERS, LEADING_FORWARD_SLASH, and RESERVED_CODE, which highlight the restrictions and expected format of the adUnitCode.

  • The document highlights multiple services, including ForecastService, InventoryService and PublisherQueryLanguageService, that are related to the errors listed.

  • The document mentions multiple error types, ranging from AdUnitHierarchyError, ApiVersionError all the way to UniqueError and they all point back to the PublisherQueryLanguageService.

Lists the generic errors associated with AdUnit.adUnitCode.


Namespace
https://www.google.com/apis/ads/publisher/v202411

Field

ApiError (inherited)

fieldPath

xsd:string

The OGNL field path to identify cause of error.

fieldPathElements

FieldPathElement[]

A parsed copy of the field path. For example, the field path "operations[1].operand" corresponds to this list: {FieldPathElement(field = "operations", index = 1), FieldPathElement(field = "operand", index = null)}.

trigger

xsd:string

The data that caused the error.

errorString

xsd:string

A simple string representation of the error and reason.

AdUnitCodeError

reason

AdUnitCodeError.Reason


Enumerations
INVALID_CHARACTERS
For AdUnit.adUnitCode, only alpha-numeric characters, underscores, hyphens, periods, asterisks, double quotes, back slashes, forward slashes, exclamations, left angle brackets, colons and parentheses are allowed.
INVALID_CHARACTERS_WHEN_UTF_CHARACTERS_ARE_ALLOWED
For AdUnit.adUnitCode, only letters, numbers, underscores, hyphens, periods, asterisks, double quotes, back slashes, forward slashes, exclamations, left angle brackets, colons and parentheses are allowed.
INVALID_CHARACTERS_FOR_LEGACY_AD_EXCHANGE_TAG
For AdUnit.adUnitCode representing slot codes, only alphanumeric characters, underscores, hyphens, periods and colons are allowed.
LEADING_FORWARD_SLASH
For AdUnit.adUnitCode, forward slashes are not allowed as the first character.
RESERVED_CODE
Specific codes matching ca-*pub-*-tag are reserved for "Web Property IUs" generated as part of the SlotCode migration.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.