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"
      }
    ]
  }
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/81ed5852-f358-468a-ad28-a15a8cce1c3cn%40googlegroups.com.

Reply via email to