google-ads-php: Partial failure errors. ResourceCountLimitExceededError does not contain error details.
sdk version : “googleads/google-ads-php”: “v6.0.0” and “v4.0.0” php version: 7.3
Good morning,
We are investigating an error that we got back from the Google Ads API v4 and now that we updated to v6 it’s still occurring. It has been a long time that this error is occurring and we still don’t know what to do. We contacted google ads support via email and they suggested that the library might be the problem. I will explain the issue in most detail and at the end I will add the google ads support response.
During publishing bid modifiers for hotel ads we got some partial failure errors RESOURCE_LIMIT The message of these errors mentioned that there would be more details in the ErrorDetails. When we checked out these ErrorDetails however, they were empty. We reproduced this locally by performing a mutate request containing 31 length of stay bid modifiers (HotelAdvanceBookingWindow). We chose 31 here because 30 is allowed as we can see here https://support.google.com/google-ads/answer/9244121?hl=en. We get a partial failure error for each of them but none of them include ErrorDetails. Example code:
$response->getResults()[0]->getPartialFailureError()->getMessage()
> This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails.
$response->getResults()[0]->getPartialFailureError()->getDetails()
> NULL
See attached image which shows to further understand where this happens and the response we get back.
We also increased the log level of the PHP Google Ads library to explicitly see what was going on but still we where not getting the ErrorDetails. See next lines.
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/7.3.21 gapic\/ gax\/1.3.0 grpc\/1.29.1",
"x-goog-request-params": "customer_id=1529099895",
"developer-token": "REDACTED",
"login-customer-id": "2340460323"
}
Request: {"customerId":"1529099895","operations":[{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"1","maxDays":"2"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"3","maxDays":"4"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"5","maxDays":"6"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"7","maxDays":"8"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"8","maxDays":"9"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"10","maxDays":"11"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"12","maxDays":"13"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"14","maxDays":"15"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"16","maxDays":"17"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"18","maxDays":"19"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"20","maxDays":"21"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"22","maxDays":"23"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"24","maxDays":"25"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"26","maxDays":"27"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"28","maxDays":"29"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"30","maxDays":"31"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"32","maxDays":"33"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"34","maxDays":"35"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"36","maxDays":"37"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"38","maxDays":"39"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"40","maxDays":"41"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"42","maxDays":"43"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"44","maxDays":"45"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"46","maxDays":"47"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"48","maxDays":"49"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"50","maxDays":"51"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"52","maxDays":"53"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"54","maxDays":"55"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"56","maxDays":"57"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"58","maxDays":"59"}}},{"create":{"adGroup":"customers\/1529099895\/adGroups\/116045426808","bidModifier":2,"bidModifierSource":"AD_GROUP","hotelAdvanceBookingWindow":{"minDays":"60","maxDays":"61"}}}],"partialFailure":true}
Response
-------
Headers: {
"content-disposition": "attachment",
"request-id": "dWju9uwE1131pzAeyE7b0Q",
"date": "Thu, 08 Oct 2020 18:25:40 GMT",
"alt-svc": "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}
Response: {"partialFailureError":{"code":3,"message":"Multiple errors in ‘details’. First error: This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails., at operations[1].create.hotel_advance_booking_window","details":[{"@type":"type.googleapis.com/google.ads.googleads.v4.errors.GoogleAdsFailure","errors":[{"errorCode":{"resourceCountLimitExceededError":"RESOURCE_LIMIT"},"message":"This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails.","location":{"fieldPathElements":[{"fieldName":"operations","index":"1"},{"fieldName":"create"},{"fieldName":"hotel_advance_booking_window"}]}},{"errorCode":{"resourceCountLimitExceededError":"RESOURCE_LIMIT"},"message":"This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails.","location":{"fieldPathElements":[{"fieldName":"operations","index":"2"},{"fieldName":"create"},{"fieldName":"hotel_advance_booking_window"}]}},{"errorCode":{"resourceCountLimitExceededError":"RESOURCE_LIMIT"},"message":"This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails.","location":{"fieldPathElements":[{"fieldName":"operations","index":"3"},{"fieldName":"create"},{"fieldName":"hotel_advance_booking_window"}]}},{"errorCode":{"resourceCountLimitExceededError":"RESOURCE_LIMIT"},"message":"This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails.","location":{"fieldPathElements":[{"fieldName":"operations","index":"4"},{"fieldName":"create"},{"fieldName":"hotel_advance_booking_window"}]}},{"errorCode":{"resourceCountLimitExceededError":"RESOURCE_LIMIT"},"message":"This request would exceed a limit on the number of allowed resources. The details of which type ...
Google support response:
… From our end, our team was able to confirm that the details object is being included the response. Since this also involves the PHP client library on how to further extract the details via PHP, I would recommend that you also reach out to the client library owners via this Github link. …
Could you advise where we can programmatically get the ErrorDetails mentioned in the error message? If there’s anything unclear please let me know.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (8 by maintainers)
OK. Then, at least we see the same thing now. 😃 I’m following up with this information and will get back to this issue, when I have more information.
Thanks for the info. Now I can confirm all information that I want.
Looking into this, I think the error message itself is confusing. When you turn on the partial failure mode, it will not throw
GoogleAdsError, hence you cannot get anyErrorDetailsfrom that object. Instead, it will just return aMutateAdGroupBidModifiersResponse, containingpartial_failure_error.Let me confirm this with our expert on this matter, and will get back to you.
Thanks for the info. I think I found the relevant case where you communicated with our team. Let me take a look and get back to you in 1-2 days.