Hi Ivan,
thank you for the fast response... I found that page before, but unfortunately the exception does not occur - the function stops after calling mutateLink() with an already managed customer id; try-catch fails and the SOAP warning shows up directly inside the console. So the function gets terminated without returning any value or being able to handle the exception.
[2017-04-20 10:37:48] AW_SOAP.WARNING: clientCustomerId=xxxxx operations=1 service=ManagedCustomerService method=mutateLink responseTime=346 requestId=00054d950e42c5210ac11e13d7077a46 server=
adwords.google.com isFault=1 faultMessage=[ManagedCustomerServiceError.ALREADY_INVITED_BY_THIS_MANAGER @ operations[0]]
Here I have my ManagedCustomerServiceError.ALREADY_INVITED_BY_THIS_MANAGER... but how can I access and handle it? This does not work:
try {
$result = $customerService->mutateLink($operations);
$links = $result->getLinks() ;
$link = $links[0];
$newStatus = $link->getLinkStatus() ;
if (strpos($newStatus, 'PENDING') >= 0) return "OK"; else return "ERR: ".$newStatus ;
} catch (Exception $e) {
//
return "you will never see this line, sorry..." ;
}
best regards,
Markus