My fastest solution was the following:
$error_message = str_replace(". Remove the existing asset first if you
would like to change the name of the asset.,
reason=CANNOT_MODIFY_ASSET_NAME}]","",str_replace("'", "",
$e->getMessage()));
$arr = explode(" ", $ error_message);
$size = sizeof($arr);
$asset_Id = trim($arr[$size -1]);
Once the asset_id is obtained, this is the same one that I send together
with the creation of the campaign
I am using the PHP SDK
El martes, 15 de febrero de 2022 a la(s) 12:06:03 UTC-5, [email protected]
escribió:
> Lately I have been getting this error too.
>
> I used to get it in the past by passing an asset name when creating the
> asset, but then I realized that the asset name was optional, so not passing
> the asset name solved the issue. However now I'm getting the issue again
> even though I'm not passing any asset name.
>
> El viernes, 11 de febrero de 2022 a las 23:32:50 UTC+1, adsapi escribió:
>
>> Hi Luciano,
>>
>> Right now, parsing the error message is the way to handle this error.
>> I'll work with the team to try and introduce a better way to expose this
>> error.
>>
>>
>> Cheers
>> Anash
>>
>>
>> ref:_00D1U1174p._5004Q2Hyur3:ref
>>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/460d04d7-3105-4f34-a9d7-f36ddc24c803n%40googlegroups.com.