MONEI / Shopify-api-node

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

HTTPError: Response code 503 (Service Unavailable) #538

Closed xmdcode closed 2 years ago

xmdcode commented 2 years ago

Hello ,

i am getting randomly HTTPError: Response code 503 (Service Unavailable) which makes my app crash (i haven't used try catch on this error because it was never happening).

It seems to happen when i am getting the list of products

with this similar code

(async () => {
  let params = { limit: 10 };

  do {
    const products = await shopify.product.list(params);

    console.log(products);

    params = products.nextPageParameters;
  } while (params !== undefined);
})().catch(console.error);
lpinca commented 2 years ago

It means that the Shopify API is down. There is not much do other than handling the error.

lpinca commented 2 years ago

I'm closing this as answered.