project_e_commerce
project_e_commerce copied to clipboard
FIX: STATUS 422 "The given data was invalid"
A problem in Controller fixed.
Thank you, Adrian but the code working correctly and the site in Github pages working
@samerlagha Hey bro, can you help me out on this? I'm still getting ❌ HTTP ERROR [422] Type: index.js:1 The given data was invalid.
i didnt receive mail.how can i fix that?
anyone please
Hello everyone , sorry for answering so late ,scanner77 please send me a link to your rep to email , Jayshree9393 also sent a letter because I did not understand your question , hangdai001 the same . [email protected]
I dont want to include any payment method and shipping methods. So i excluded it from the code. But now during checkout after I submit the confirmation page It shows the error.
Yes exactly
On Thu, Aug 19, 2021, 11:21 AM hangdai001 @.***> wrote:
I dont want to include any payment method and shipping methods. So i excluded it from the code. But now during checkout after I submit the confirmation page It shows the error.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adrianhajdin/project_e_commerce/pull/23#issuecomment-901629901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQWJLTXO3EAH4GM72FFWIODT5SLVBANCNFSM4532MOJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
can anybody solve my error
please mail me how I proceed [email protected]
Thank you, Adrian but the code working correctly and the site in Github pages working
After I click Checkout button I'm facing the errors displayed in the pic.....I would be happy if you could help me.


#1 Error: The given data was invalid
I believe the problem is with the line items. Perhaps I need to stringify the email, firstname, lastname, and town_city objects.
Any help would be greatly appreciated. Below is is my error and relevant files.
Chrome DevTools Error
src/components/CheckoutForm/Checkout
src/components/CheckoutForm/AddressForm
src/components/CheckoutForm/Checkout/CustomTextField
src/components/CheckoutForm/Checkout/PaymentForm
src/components/CheckoutForm/Checkout/Review
src/App.js
I've tried multiple fixes to this problem including the sanitized line items here: https://github.com/adrianhajdin/project_e_commerce/issues/36#issuecomment-962534605
But nothing has worked so far.
@Darkskittlz did you find a fix for it? I have the exact same problem
Hey @mehulpuri, no I haven't found a fix yet. I feel like the data isn't being properly encoded so when the payload sends over to commerceJS the API can't read the data.
@Darkskittlz fixed every bug , check my repository for the running website
@Darkskittlz fixed every bug , check my repository for the running website
Very nice! I just went through the checkout, super smooth.