type TokenError (v202505)

  • The UserService provides access to various error types that can be encountered when interacting with the service, including ApiError, ApiVersionError, AuthenticationError, and more.

  • The TokenError is specifically for exceptions that occur when using a token.

  • The ApiError object, which TokenError inherits from, contains fields such as fieldPath, fieldPathElements, trigger, and errorString to help identify the cause and details of an error.

  • The TokenError itself has a reason field which can indicate if a token is INVALID, EXPIRED, or if the reason is UNKNOWN.

An error for an exception that occurred when using a token.


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

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.

TokenError

reason

TokenError.Reason


Enumerations
INVALID
EXPIRED
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.