MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
952 stars 280 forks source link

Question: Polling for Checkout API 303 Response Codes? #384

Closed tylerpharand closed 4 years ago

tylerpharand commented 4 years ago

The Shopify documentation mentions that the creation of checkouts may be throttled in some circumstances, causing the API to send HTTP 303 See Other response codes. These responses need to be polled with the provided Location header.

From what I can tell, shopify-api-node only polls for 202 response codes: https://github.com/MONEI/Shopify-api-node/blob/master/index.js#L138

Although I was personally not able to reproduce a 303 code through this module, I'm wondering if the polling is missing? Or is it being handled somewhere else?

Reference: https://shopify.dev/tutorials/sell-through-the-checkout-api#checkout-throttle-polling

lpinca commented 4 years ago

got the underlying HTTP client we use in shopify-api-node already follows redirects (3xx) automatically unless the feature is disabled (which is not currently).

tylerpharand commented 4 years ago

Great. Thanks for the info!