type GeoTargetingError (v202411)
Stay organized with collections
Save and categorize content based on your preferences.
Lists all errors associated with geographical targeting for a
LineItem.
- 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.
|
GeoTargetingError
|
reason
|
GeoTargetingError.Reason
The error reason represented by an enum.
Enumerations
-
TARGETED_LOCATIONS_NOT_EXCLUDABLE
- A location that is targeted cannot also be excluded.
-
EXCLUDED_LOCATIONS_CANNOT_HAVE_CHILDREN_TARGETED
- Excluded locations cannot have any of their children targeted.
-
POSTAL_CODES_CANNOT_BE_EXCLUDED
- Postal codes cannot be excluded.
-
UNTARGETABLE_LOCATION
- Indicates that location targeting is not allowed.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eGeoTargetingError\u003c/code\u003e identifies errors related to geographical targeting within a LineItem.\u003c/p\u003e\n"],["\u003cp\u003eThis error is applicable to various services like AdRuleService, ForecastService, LineItemService, etc.\u003c/p\u003e\n"],["\u003cp\u003eThe error may occur due to reasons like targeting and excluding the same location, attempting to exclude postal codes, or targeting untargetable locations.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ereason\u003c/code\u003e field provides further details on the specific cause of the error.\u003c/p\u003e\n"],["\u003cp\u003eThe error structure includes inherited fields from \u003ccode\u003eApiError\u003c/code\u003e for comprehensive debugging.\u003c/p\u003e\n"]]],["The document details `GeoTargetingError`, part of `AdRuleService`, and its relation to other services like `AdjustmentService`, `ForecastService`, and `LineItemService`. It outlines that `GeoTargetingError` inherits from `ApiError`, which includes fields like `fieldPath`, `trigger`, and `errorString`. The core content lies in defining the `GeoTargetingError.Reason` enumeration, specifying errors such as `TARGETED_LOCATIONS_NOT_EXCLUDABLE`, `EXCLUDED_LOCATIONS_CANNOT_HAVE_CHILDREN_TARGETED`, `POSTAL_CODES_CANNOT_BE_EXCLUDED`, `UNTARGETABLE_LOCATION`, and `UNKNOWN`.\n"],null,["# type GeoTargetingError (v202411)\n\n**Service** \n**AdRuleService** [AdjustmentService](/ad-manager/api/reference/v202411/AdjustmentService.GeoTargetingError) [ForecastService](/ad-manager/api/reference/v202411/ForecastService.GeoTargetingError) [LineItemService](/ad-manager/api/reference/v202411/LineItemService.GeoTargetingError) [LineItemTemplateService](/ad-manager/api/reference/v202411/LineItemTemplateService.GeoTargetingError) [OrderService](/ad-manager/api/reference/v202411/OrderService.GeoTargetingError) [ProposalLineItemService](/ad-manager/api/reference/v202411/ProposalLineItemService.GeoTargetingError) [TargetingPresetService](/ad-manager/api/reference/v202411/TargetingPresetService.GeoTargetingError) [YieldGroupService](/ad-manager/api/reference/v202411/YieldGroupService.GeoTargetingError) **Inheritance** \n[ApiError](/ad-manager/api/reference/v202411/AdRuleService.ApiError) \n▼\n[AdRuleDateError](/ad-manager/api/reference/v202411/AdRuleService.AdRuleDateError) [AdRuleError](/ad-manager/api/reference/v202411/AdRuleService.AdRuleError) [AdRuleFrequencyCapError](/ad-manager/api/reference/v202411/AdRuleService.AdRuleFrequencyCapError) [AdRulePriorityError](/ad-manager/api/reference/v202411/AdRuleService.AdRulePriorityError) [AdRuleSlotError](/ad-manager/api/reference/v202411/AdRuleService.AdRuleSlotError) [AdRuleTargetingError](/ad-manager/api/reference/v202411/AdRuleService.AdRuleTargetingError) [ApiVersionError](/ad-manager/api/reference/v202411/AdRuleService.ApiVersionError) [AuthenticationError](/ad-manager/api/reference/v202411/AdRuleService.AuthenticationError) [CollectionSizeError](/ad-manager/api/reference/v202411/AdRuleService.CollectionSizeError) [CommonError](/ad-manager/api/reference/v202411/AdRuleService.CommonError) [CustomTargetingError](/ad-manager/api/reference/v202411/AdRuleService.CustomTargetingError) [FeatureError](/ad-manager/api/reference/v202411/AdRuleService.FeatureError) **GeoTargetingError** [InternalApiError](/ad-manager/api/reference/v202411/AdRuleService.InternalApiError) [InventoryTargetingError](/ad-manager/api/reference/v202411/AdRuleService.InventoryTargetingError) [NotNullError](/ad-manager/api/reference/v202411/AdRuleService.NotNullError) [ParseError](/ad-manager/api/reference/v202411/AdRuleService.ParseError) [PermissionError](/ad-manager/api/reference/v202411/AdRuleService.PermissionError) [PoddingError](/ad-manager/api/reference/v202411/AdRuleService.PoddingError) [PublisherQueryLanguageConte...](/ad-manager/api/reference/v202411/AdRuleService.PublisherQueryLanguageContextError \"PublisherQueryLanguageContextError\") [PublisherQueryLanguageSynta...](/ad-manager/api/reference/v202411/AdRuleService.PublisherQueryLanguageSyntaxError \"PublisherQueryLanguageSyntaxError\") [QuotaError](/ad-manager/api/reference/v202411/AdRuleService.QuotaError) [RequiredCollectionError](/ad-manager/api/reference/v202411/AdRuleService.RequiredCollectionError) [RequiredError](/ad-manager/api/reference/v202411/AdRuleService.RequiredError) [RequiredNumberError](/ad-manager/api/reference/v202411/AdRuleService.RequiredNumberError) [ServerError](/ad-manager/api/reference/v202411/AdRuleService.ServerError) [StatementError](/ad-manager/api/reference/v202411/AdRuleService.StatementError) [StringFormatError](/ad-manager/api/reference/v202411/AdRuleService.StringFormatError) [StringLengthError](/ad-manager/api/reference/v202411/AdRuleService.StringLengthError) [UniqueError](/ad-manager/api/reference/v202411/AdRuleService.UniqueError)\n\nLists all errors associated with geographical targeting for a\n[LineItem](/ad-manager/api/reference/v202411/ForecastService.LineItem).\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202411`\n\n| Field ----- ||\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **`ApiError` (inherited)** ||\n| ### `fieldPath` | ` `xsd:`string` The OGNL field path to identify cause of error. |\n| ### `fieldPathElements` | ` `[FieldPathElement](/ad-manager/api/reference/v202411/AdRuleService.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)}. |\n| ### `trigger` | ` `xsd:`string` The data that caused the error. |\n| ### `errorString` | ` `xsd:`string` A simple string representation of the error and reason. |\n| **`GeoTargetingError`** ||\n| ### `reason` | ` `[GeoTargetingError.Reason](/ad-manager/api/reference/v202411/AdRuleService.GeoTargetingError.Reason)` ` The error reason represented by an enum. *** ** * ** *** **Enumerations** `TARGETED_LOCATIONS_NOT_EXCLUDABLE` : A location that is targeted cannot also be excluded. `EXCLUDED_LOCATIONS_CANNOT_HAVE_CHILDREN_TARGETED` : Excluded locations cannot have any of their children targeted. `POSTAL_CODES_CANNOT_BE_EXCLUDED` : Postal codes cannot be excluded. `UNTARGETABLE_LOCATION` : Indicates that location targeting is not allowed. `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. \u003cbr /\u003e |"]]