# type InventoryTargetingError (v202608)

**Service** [AdRuleService](https://developers.google.com/ad-manager/api/reference/v202608/AdRuleService.InventoryTargetingError.md.txt) [AdjustmentService](https://developers.google.com/ad-manager/api/reference/v202608/AdjustmentService.InventoryTargetingError.md.txt) [ForecastService](https://developers.google.com/ad-manager/api/reference/v202608/ForecastService.InventoryTargetingError.md.txt) [LineItemService](https://developers.google.com/ad-manager/api/reference/v202608/LineItemService.InventoryTargetingError.md.txt) [LineItemTemplateService](https://developers.google.com/ad-manager/api/reference/v202608/LineItemTemplateService.InventoryTargetingError.md.txt) [NativeStyleService](https://developers.google.com/ad-manager/api/reference/v202608/NativeStyleService.InventoryTargetingError.md.txt) [OrderService](https://developers.google.com/ad-manager/api/reference/v202608/OrderService.InventoryTargetingError.md.txt) [ProposalLineItemService](https://developers.google.com/ad-manager/api/reference/v202608/ProposalLineItemService.InventoryTargetingError.md.txt) **PublisherQueryLanguageService** [TargetingPresetService](https://developers.google.com/ad-manager/api/reference/v202608/TargetingPresetService.InventoryTargetingError.md.txt) [YieldGroupService](https://developers.google.com/ad-manager/api/reference/v202608/YieldGroupService.InventoryTargetingError.md.txt) **Inheritance** [ApiError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.ApiError.md.txt) ▼ [AdUnitCodeError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.AdUnitCodeError.md.txt) [AdUnitHierarchyError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.AdUnitHierarchyError.md.txt) [ApiVersionError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.ApiVersionError.md.txt) [AudienceSegmentError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.AudienceSegmentError.md.txt) [AuthenticationError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.AuthenticationError.md.txt) [CollectionSizeError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.CollectionSizeError.md.txt) [CommonError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.CommonError.md.txt) [CreativeError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.CreativeError.md.txt) [DealError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.DealError.md.txt) [ExchangeRateError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.ExchangeRateError.md.txt) [FeatureError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.FeatureError.md.txt) [FileError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.FileError.md.txt) [InternalApiError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.InternalApiError.md.txt) [InvalidEmailError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.InvalidEmailError.md.txt) [InvalidUrlError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.InvalidUrlError.md.txt) **InventoryTargetingError** [InventoryUnitError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.InventoryUnitError.md.txt) [LineItemFlightDateError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.LineItemFlightDateError.md.txt) [LineItemOperationError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.LineItemOperationError.md.txt) [NotNullError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.NotNullError.md.txt) [NullError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.NullError.md.txt) [OrderActionError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.OrderActionError.md.txt) [OrderError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.OrderError.md.txt) [ParseError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.ParseError.md.txt) [PermissionError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.PermissionError.md.txt) [PublisherQueryLanguageConte...](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.PublisherQueryLanguageContextError.md.txt "PublisherQueryLanguageContextError") [PublisherQueryLanguageSynta...](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.PublisherQueryLanguageSyntaxError.md.txt "PublisherQueryLanguageSyntaxError") [QuotaError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.QuotaError.md.txt) [RangeError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RangeError.md.txt) [RegExError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RegExError.md.txt) [RequestError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RequestError.md.txt) [RequiredCollectionError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RequiredCollectionError.md.txt) [RequiredError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RequiredError.md.txt) [RequiredNumberError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RequiredNumberError.md.txt) [RequiredSizeError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.RequiredSizeError.md.txt) [ReservationDetailsError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.ReservationDetailsError.md.txt) [ServerError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.ServerError.md.txt) [StatementError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.StatementError.md.txt) [StringFormatError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.StringFormatError.md.txt) [StringLengthError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.StringLengthError.md.txt) [TypeError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.TypeError.md.txt) [UniqueError](https://developers.google.com/ad-manager/api/reference/v202608/PublisherQueryLanguageService.UniqueError.md.txt)

Lists all inventory errors caused by associating a line item with a targeting
expression.

*** ** * ** ***

Namespace
:
    `https://www.google.com/apis/ads/publisher/v202608`

| ## 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. |
| **`InventoryTargetingError`** ||
| ### `reason` | ` InventoryTargetingError.Reason ` The error reason represented by an enum. *** ** * ** *** **Enumerations** `AT_LEAST_ONE_PLACEMENT_OR_INVENTORY_UNIT_REQUIRED` :   At least one placement or inventory unit is required `INVENTORY_CANNOT_BE_TARGETED_AND_EXCLUDED` :   The same inventory unit or placement cannot be targeted and excluded at the same time `INVENTORY_UNIT_CANNOT_BE_TARGETED_IF_ANCESTOR_IS_TARGETED` :   A child inventory unit cannot be targeted if its ancestor inventory unit is also targeted. `INVENTORY_UNIT_CANNOT_BE_TARGETED_IF_ANCESTOR_IS_EXCLUDED` :   A child inventory unit cannot be targeted if its ancestor inventory unit is excluded. `INVENTORY_UNIT_CANNOT_BE_EXCLUDED_IF_ANCESTOR_IS_EXCLUDED` :   A child inventory unit cannot be excluded if its ancestor inventory unit is also excluded. `EXPLICITLY_TARGETED_INVENTORY_UNIT_CANNOT_BE_TARGETED` :   An explicitly targeted inventory unit cannot be targeted. `EXPLICITLY_TARGETED_INVENTORY_UNIT_CANNOT_BE_EXCLUDED` :   An explicitly targeted inventory unit cannot be excluded. `SELF_ONLY_INVENTORY_UNIT_NOT_ALLOWED` :   A landing page-only ad unit cannot be targeted. `SELF_ONLY_INVENTORY_UNIT_WITHOUT_DESCENDANTS` :   A landing page-only ad unit cannot be targeted if it doesn't have any children. `YOUTUBE_AUDIENCE_SEGMENTS_CAN_ONLY_BE_TARGETED_WITH_YOUTUBE_SHARED_INVENTORY` :   Audience segments shared from YouTube can only be targeted with inventory shared from YouTube for cross selling. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. <br /> |