Google::Ads::GoogleAds::Utils::PartialFailureUtils
use Google::Ads::GoogleAds::Utils::PartialFailureUtils; while (my ($operation_index, $result) = each @{$response->{results}}) { if (is_partial_failure_result($result)) { my $google_ads_errors = get_google_ads_errors($operation_index, $ad_group_response->{partialFailureError}); foreach my $google_ads_error (@$google_ads_errors) { printf "Operation %d failed with error: %s\n", $operation_index, $google_ads_error->{message}; } } else { printf "Operation %d succeeded.\n", $operation_index; } }
This module contains utility methods for handling partial failure of operations.
Checks if a result in a mutate response is a partial failure.
result: a result hash in a mutate response.
True, if the result is a partial failure. False, otherwise.
Returns a list of Google::Ads::GoogleAds::VX::Errors::GoogleAdsError instances for a given operation index.
operation_index: the index of the operation, starting from 0.
partial_failure_error: the partialFailureError hash in the mutate response, with the detail list containing Google::Ads::GoogleAds::VX::Errors::GoogleAdsFailure instances.
An array containing the Google::Ads::GoogleAds::VX::Errors::GoogleAdsError instances for the given operation index.
Extracts the Google::Ads::GoogleAds::VX::Errors::GoogleAdsFailure instance from a partial failure detail.
detail: an element in the details hash in the mutate response.
A Google::Ads::GoogleAds::VX::Errors::GoogleAdsFailure object or undef if not found.
The private method to extract a list of Google::Ads::GoogleAds::VX::Errors::GoogleAdsError instances from a Google::Ads::GoogleAds::VX::Errors::GoogleAdsFailure instance for a given operation index.
google_ads_failure: the Google::Ads::GoogleAds::VX::Errors::GoogleAdsFailure instance.
An array containing the Google::Ads::GoogleAds::VX::Errors::GoogleAdsError instances from the Google::Ads::GoogleAds::VX::Errors::GoogleAdsFailure instance for the given operation index.
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
$Rev: $ $LastChangedBy: $ $Id: $
To install Google::Ads::GoogleAds::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::Ads::GoogleAds::Client
CPAN shell
perl -MCPAN -e shell install Google::Ads::GoogleAds::Client
For more information on module installation, please visit the detailed CPAN module installation guide.