Hello,

I want to log request ids for partial failure requests, but can't find a 
way to get it from the response. The metadata is absent in the response I 
get from the ConversionUploadService and request_id attribute seems to be 
not set for partial failure errors (it's always an empty string).

Here is an example of the request/response from the logs:
--------------------
Request
------
Method: 
/google.ads.googleads.v7.services.ConversionUploadService/UploadClickConversions
Host: googleads.googleapis.com
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "3875470276",
  "x-goog-api-client": "gl-python/3.8.10 grpc/1.38.0 gax/1.28.0",
  "x-goog-request-params": "customer_id=1902650607"
}
Request: customer_id: "1902650607"
conversions {
  gclid: "EAIaIQobChMIwPu5t4qs3AIVAQAAAB0BAAAAEAAYACAAEgJVzfD_BwE"
  conversion_action: "customers/1902650607/conversionActions/480808269"
  conversion_date_time: "2021-07-22 09:37:29+00:00"
}
partial_failure: true


Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "0IljGaHjx9yW7DBlykrG7Q"
}
Response: partial_failure_error {
  code: 3
  message: "The click associated with this Google Click ID is either too 
old to be imported or occurred before the conversion click through lookback 
window for the specified combination of conversion date and conversion 
action (default is 90 days)., at conversions[0].gclid"
  details {
    type_url: 
"type.googleapis.com/google.ads.googleads.v7.errors.GoogleAdsFailure"
    value: "\n\313\002\n\003\370\006\005\022\354\001The click associated 
with this Google Click ID is either too old to be imported or occurred 
before the conversion click through lookback window for the specified 
combination of conversion date and conversion action (default is 90 
days).\0329*7EAIaIQobChMIwPu5t4qs3AIVAQAAAB0BAAAAEAAYACAAEgJVzfD_BwE\"\032\022\017\n\013conversions\030\000\022\007\n\005gclid"
  }
}
results {
}


Request made: ClientCustomerId: 1902650607, Host: googleads.googleapis.com, 
Method: 
/google.ads.googleads.v7.services.ConversionUploadService/UploadClickConversions,
 
RequestId: 0IljGaHjx9yW7DBlykrG7Q, IsFault: False, FaultMessage: None
--------------------

As you can see, request id is definitely there, but in partial failure 
GoogleAdsFailure 
object it's just ''
------
failure_message = ads_client.client.get_type("GoogleAdsFailure", 'v7')
GoogleAdsFailure = type(failure_message)
failure_object = 
GoogleAdsFailure.deserialize(response.partial_failure_error.details[0].value)

print(failure_object.request_id) => ''
------

Any ideas how to get a request id from the response object?

I'm using: 
python 3.8.10
google-ads 11.0.0

Thanks,
Vladimir

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/6ade2520-c6db-4d66-80d3-56ee621b904cn%40googlegroups.com.

Reply via email to