MONEI / Shopify-api-node

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

Cannot read property 'extensions' of undefined #547

Closed guilhermeprokisch closed 2 years ago

guilhermeprokisch commented 2 years ago

When I'm using the product.update method with variant info on the payload I'm getting an error Cannot read property 'extensions' of undefined.

lpinca commented 2 years ago

Can you please post the full stack trace?

lpinca commented 2 years ago

My guess is that the error is thrown here

https://github.com/MONEI/Shopify-api-node/blob/49a52f778529632887e717848fe4214ac2d97cc6/index.js#L383

If so, can also log somehow body.errors and the response status code?

guilhermeprokisch commented 2 years ago

Thanks for the fast reply!

It's hard to replicated this error locally. It's happening just with some products of some clients on production. This why I also have difficult to post the trace here cause it will have the client payload. Any idea how we can do it?

guilhermeprokisch commented 2 years ago

But I just had some progress, seems indeed related with the auto retry option. I take off and now I got a different error. HTTPError: Response code 422 (Unprocessable Entity)

lpinca commented 2 years ago

Ok, thank you for the additional info. The 422 status code should not be retried. I think there is a bug in got. This needs further investigation.