App reviews, troubleshooting, and recommendations
Hi, I'm using Shopify's Remix App Template, and have setup a webhook for products updated. I want it to send the updated product to my backend server. However I'm having some issues doing so.
I get this error:
15:42:55 │ remix │ PRODUCTS_UPDATE error: SyntaxError: Unexpected token 'o', "[object Rea"... is not valid JSON
and:
Request.body: ReadableStream { locked: true, state: 'closed', supportsBYOB: false }
Here is my case for product update:
case 'PRODUCTS_UPDATE': console.log('PRODUCTS_UPDATE case called.'); console.log('PRODUCTS_UPDATE called.'); if ( !request.body ) { console.log('PRODUCTS_UPDATE request.body is null.', request.body); break } try { const product = JSON.parse(request.body.toString()); console.log('PRODUCTS_UPDATE product:', product); const response = await axios.post( `${API_DOMAIN}/products/update`, { store_url: shop, product: product }, { headers: { 'Content-Type': 'application/json', }, }, ); }catch (error: unknown) { console.log('PRODUCTS_UPDATE error:', error) console.log("Request.body: ______" ,request.body, "______ REQUEST: ______", request, "______"); }break;
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025