woocommerce/pinterest-for-woocommerce

Duplicated log entries for GET catalog feed processing results

Closed this issue · 0 comments

Describe the bug:

In my log file, I noticed there are multiple log entries for the same GET https://api.pinterest.com/v5/catalogs/feeds/<ID>/processing_results?ad_account_id=<AD_ACCOUNT_ID>&page_size=1 HTTP request at the same time.

The following is an example from my log file:

2024-03-20T16:23:48+00:00 Debug GET Request: https://api.pinterest.com/v5/catalogs/feeds/1537765895702/processing_results?ad_account_id=549767487031&page_size=1

--- EMPTY STRING ---
2024-03-20T16:23:48+00:00 Debug GET Request: https://api.pinterest.com/v5/catalogs/feeds/1537765895702/processing_results?ad_account_id=549767487031&page_size=1

--- EMPTY STRING ---
2024-03-20T16:23:48+00:00 Debug Response: 

Status: 200 OK

Headers: {"content-length":"417","content-type":"application\/json","pinterest-version":"85aed37","x-content-type-options":"nosniff","x-frame-options":"DENY","access-control-allow-credentials":"true","p3p":"CP=\"Pinterest does not have a P3P policy. You can find our privacy policy at https:\/\/www.pinterest.com\/_\/_\/policy\/privacy-policy.\"","x-envoy-upstream-service-time":"87","x-ratelimit-limit":"100, 100;w=1, 100;w=60","x-ratelimit-remaining":"97","x-ratelimit-reset":"12","cache-control":"no-cache, no-store, must-revalidate","age":"0","set-cookie":"_ir=0; Max-Age=1800; HttpOnly; Path=\/; Secure","x-pinterest-rid":"6640687007798869","date":"Wed, 20 Mar 2024 16:23:48 GMT","x-cdn":"fastly","alt-svc":"h3=\":443\";ma=600","pinterest-generated-by":"tpp-api-prod-0a031101"}

Body: {"items":[{"created_at":"2024-03-20T16:23:46","id":"3462768914548401246","validation_details":{"errors":{},"warnings":{}},"ingestion_details":{"errors":{},"info":{},"warnings":{}},"product_counts":{},"updated_at":"2024-03-20T16:23:48","status":"PROCESSING"}],"bookmark":"Pz8xNzEwOTUxODI2MDAwfDY2NDA2ODcwMDc3OTg4NjkqR1FMKnxlN2EwNWQ3NWNlOGJjMzA3MGFhZjg1MTc0NDlmMTZjZWNjOWViZDA1ZWQzYTUxMGVjZmY1NjNhMWVhY2FhNDgzfE5FV3w="}
2024-03-20T16:23:48+00:00 Debug GET Request: https://api.pinterest.com/v5/catalogs/processing_results/3462768914548401246/item_issues?page_size=250

--- EMPTY STRING ---
2024-03-20T16:23:48+00:00 Debug Response: 

Status: 200 OK

Headers: {"content-length":"417","content-type":"application\/json","pinterest-version":"85aed37","x-content-type-options":"nosniff","x-frame-options":"DENY","access-control-allow-credentials":"true","p3p":"CP=\"Pinterest does not have a P3P policy. You can find our privacy policy at https:\/\/www.pinterest.com\/_\/_\/policy\/privacy-policy.\"","x-envoy-upstream-service-time":"93","x-ratelimit-limit":"100, 100;w=1, 100;w=60","x-ratelimit-remaining":"97","x-ratelimit-reset":"12","cache-control":"no-cache, no-store, must-revalidate","age":"0","set-cookie":"_ir=0; Max-Age=1800; HttpOnly; Path=\/; Secure","x-pinterest-rid":"1293508972982510","date":"Wed, 20 Mar 2024 16:23:48 GMT","x-cdn":"fastly","alt-svc":"h3=\":443\";ma=600","pinterest-generated-by":"tpp-api-prod-0a03e96d"}

Body: {"items":[{"created_at":"2024-03-20T16:23:46","updated_at":"2024-03-20T16:23:48","product_counts":{},"status":"PROCESSING","validation_details":{"warnings":{},"errors":{}},"ingestion_details":{"info":{},"warnings":{},"errors":{}},"id":"3462768914548401246"}],"bookmark":"Pz8xNzEwOTUxODI2MDAwfDEyOTM1MDg5NzI5ODI1MTAqR1FMKnwyY2UxMjljYmI4YWE0Mzc3NGYzOTdmNmYyYzlmNTYzNGJiMTc4MzYyY2Y2NzVmNzFlNjdhNDAwYWM1MDdmYzFifE5FV3w="}
2024-03-20T16:23:48+00:00 Debug GET Request: https://api.pinterest.com/v5/catalogs/feeds/1537765895702/processing_results?ad_account_id=549767487031&page_size=1

--- EMPTY STRING ---
2024-03-20T16:23:48+00:00 Debug Response: 

Status: 200 OK

Headers: {"content-length":"28","content-type":"application\/json","pinterest-version":"85aed37","x-content-type-options":"nosniff","x-frame-options":"DENY","access-control-allow-credentials":"true","p3p":"CP=\"Pinterest does not have a P3P policy. You can find our privacy policy at https:\/\/www.pinterest.com\/_\/_\/policy\/privacy-policy.\"","x-envoy-upstream-service-time":"59","x-ratelimit-limit":"100, 100;w=1, 100;w=60","x-ratelimit-remaining":"95","x-ratelimit-reset":"12","cache-control":"no-cache, no-store, must-revalidate","age":"0","set-cookie":"_ir=0; Max-Age=1800; HttpOnly; Path=\/; Secure","x-pinterest-rid":"7981199809380701","date":"Wed, 20 Mar 2024 16:23:48 GMT","x-cdn":"fastly","alt-svc":"h3=\":443\";ma=600","pinterest-generated-by":"tpp-api-prod-0a03d218"}

Body: {"items":[],"bookmark":null}
2024-03-20T16:23:48+00:00 Debug Response: 

Status: 200 OK

Headers: {"content-length":"417","content-type":"application\/json","pinterest-version":"85aed37","x-content-type-options":"nosniff","x-frame-options":"DENY","access-control-allow-credentials":"true","p3p":"CP=\"Pinterest does not have a P3P policy. You can find our privacy policy at https:\/\/www.pinterest.com\/_\/_\/policy\/privacy-policy.\"","x-envoy-upstream-service-time":"109","x-ratelimit-limit":"100, 100;w=1, 100;w=60","x-ratelimit-remaining":"94","x-ratelimit-reset":"12","cache-control":"no-cache, no-store, must-revalidate","age":"0","set-cookie":"_ir=0; Max-Age=1800; HttpOnly; Path=\/; Secure","x-pinterest-rid":"6757266487220804","date":"Wed, 20 Mar 2024 16:23:48 GMT","x-cdn":"fastly","alt-svc":"h3=\":443\";ma=600","pinterest-generated-by":"tpp-api-prod-0a031389"}

Body: {"items":[{"updated_at":"2024-03-20T16:23:48","validation_details":{"errors":{},"warnings":{}},"id":"3462768914548401246","created_at":"2024-03-20T16:23:46","product_counts":{},"status":"PROCESSING","ingestion_details":{"errors":{},"warnings":{},"info":{}}}],"bookmark":"Pz8xNzEwOTUxODI2MDAwfDY3NTcyNjY0ODcyMjA4MDQqR1FMKnw5NjExNzQ3YzAyMzM1NTBjYTIyNDQyMjBiYWYyNjJmYTVkYTU4YTU4Y2I0NGQ5ZjY2MDhkODY0NDFhNDIzYjhkfE5FV3w="}

From the log above, notice that:

  • There are three GET https://api.pinterest.com/v5/catalogs/feeds/1537765895702/processing_results?ad_account_id=549767487031&page_size=1
  • All three of them have the same 2024-03-20T16:23:48+00:00 time stamp.
  • There are three responses that correspond to the three requests.
  • All three responses have the same data, but their output in the log are formatted differently (why?)

Steps to reproduce:

  1. Connect Pinterest account.
  2. Observe log file.

Expected behavior:

There should be only one GET https://api.pinterest.com/v5/catalogs/feeds/<ID>/processing_results?ad_account_id=<AD_ACCOUNT_ID>&page_size=1 request, and one corresponding response, at one given time.

Actual behavior:

There are multiple same requests and response at the same time, and they are formatted differently.