Hello,
When I am using grpc client in golang to remove a campaign, the only error message I can get is "rpc error: code = InvalidArgument desc = Request contains an invalid argument.".
But when I am using rest api to remove a campaign, I can get more information like "Resource was not found", "This operation is not allowed because the resource is removed." or "Resource name 'customer/1234567890/campaigns/
12345678901' is malformed: expected 'customers/{customer_id}/campaigns/{campaign_id}'." ...etc
I want to know how can I get a completed error message without directly using rest.
Do other languages using offical google api client library have the same issue? I know there isn't a offical google api client library for golang.
belows are the full outputs of 1 grpc error and 3 rest responses (I replaced campaign id, customer id and request id with "xxxxx").
grpc:
panic: rpc error: code = InvalidArgument desc = Request contains an invalid argument.
rest 1:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"errors": [
{
"errorCode": {
"mutateError": "RESOURCE_NOT_FOUND"
},
"message": "Resource was not found.",
"stringValue": "CampaignId: xxxxx"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "remove"
}
]
}
}
],
"requestId": "xxxxx"
}
}
rest2:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"details": [
{
"@type": "
type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"requestError": "RESOURCE_NAME_MALFORMED"
},
"message": "Resource name 'customer/xxxxx/campaigns/xxxxx' is malformed: expected 'customers/{customer_id}/campaigns/{campaign_id}'.",
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "remove"
}
]
}
}
],
"requestId": "xxxxx"
}
]
}
}
rest 3:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"details": [
{
"@type": "
type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"operationAccessDeniedError": "OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE"
},
"message": "This operation is not allowed because the resource is removed.",
"trigger": {
"stringValue": "Campaign"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
}
],
"requestId": "xxxxx"
}
]
}
}