Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

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

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

issactran
Shopify Partner
10 0 2

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 39

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