Return 502 when call Shopify API get product variants contains a lot currency

issactran
Shopify Partner
8 0 1

Our system gets a 502/timeout error when trying to get product information through Shopify API because some products in your store have a lot of variants of currency (specifically 100 variants).

 

Is there a problem with Shopify API and what would you recommend as a solution to this problem?

 

Thank you, 

Reply 1 (1)

awwdam
Shopify Staff
249 42 36

Hey @issactran,

While not specifically related to product variants, this community post from a while back has a reply from our team that offers some additional context on 502 errors and is absolutely worth a looking through. Based on the error and that post, limiting the volume of data per request is a good first step.

If the application built with REST, pagination would be worth exploring. If you are using GraphQL, in addition to pagination, also consider removing any requested fields/connections/fragments that aren't absolutely crucial.  

Past that, if you still feel you are facing a different and unexpected behavior, please log an example request body, URL, and response headers to provide as a starting point. The x-request-id response header returned along with an error will allow us to check our logs and pass back any other suggestions.

-  Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog