API Enhanced Plugin and 502 bad gateway error
-
Hello thank you for the excellent work.
This is all in dev so no urgency, I am working with a local install of WordPress, PHP, etc. and using NextJS as the font end.
I am adding 3 products in sequence in postman, the first product is added to the cart {“id”:”1134″,”quantity”:”1″} using the url : https://localhost/wp-json/cocart/v2/cart/add-item without an issue. When I add the second item I use the cart_key returned as a param in postman as documented, no issues here either and I get two items returned in the response.The third item is the issue (intermittently or depending on the product sequence strangely enough). I get a postman error as follows:
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>However when I query the cart separately (using the same cart_key in postman: https://localhost/wp-json/cocart/v2/cart/items?cart_key=e7a13688bf9b4d7d864c51f9037f37 I get all three items and their correct quantities.
When I uninstall the enhanced Plugin everything works fine, no 502 errors, but I really need the stock quantities returned from the enhanced plugin as it makes the font end code much simpler (just a single cart array)
- You must be logged in to reply to this topic.