Closed gchicoye closed 6 years ago
Could you please post the full stack trace?
@thangduo could you be more explicit? The full script is available here https://github.com/Insideall/dfp-prebid-lineitems
[2018-10-08 11:04:15] DFP_SOAP.WARNING: networkCode=157792674 service=LineItemCreativeAssociationService method=createLineItemCreativeAssociations responseTime=1308 requestId=278191f146dda59f4cf3f56c8070c37d server=ads.google.com isFault=1 faultMessage=[CommonError.CONCURRENT_MODIFICATION @ ]
[2018-10-08 11:04:15] DFP_SOAP.NOTICE: POST /apis/ads/publisher/v201802/LineItemCreativeAssociationService?wsdl HTTP/1.1
Host: ads.google.com
Connection: close
User-Agent: PHP-SOAP/5.6.38-0+deb8u1
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 23901
Authorization: REDACTED
<?xml version="1.0" encoding="UTF-8"?>
Hi,
This was solved using
use Google\AdsApi\Dfp\v201802\ApiException;
and
do { try { ... } catch (Api Exception $Exception) { ... }
Hi, I have from time to time issues with the LineItemCreativeAssociationService and updateLineItemCreativeAssociations Method, generating an uncaught exception.
PHP Fatal error: Uncaught exception 'Google\AdsApi\Dfp\v201802\ApiException' with message '[CommonError.CONCURRENT_MODIFICATION @ ]' in /home/gabriel/dfp/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:43
I would like my script to retry every 30 seconds 5 times this update, so I set up the calls this way
` $licaService = $this->dfpServices->get($this->session, LineItemCreativeAssociationService::class); $attempts = 0;
`
However, it looks like I don't catch the exception...
How can I update my code to have it running smoothly?
Thanks!
Gabriel