[SOLVED] Unable to submit the cartItems to my Database collection.
- 0
- Resolved
- Databases
- Functions
- Web
Hello, I have a function that allows logined-in user add items to cart, on add-to-cart click I want the Items to be submitted to the database collection I created. Ihis errors keeps coming up when I clicked on add-to-cart button.
Snip Error from the console: Add-To-Cart funtion: Function that create userItems in my Collection:
const promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', [DATA]);
Your create document function should be formatted like above. You're missing a parameter.
https://appwrite.io/docs/references/cloud/client-web/databases#createDocument
From the createUserItems function it shows I declared all the four params
This is what i was looking at
Since to me, this seems to be the function that is throwing the error for no data.
Thank you Kenny error resolved. I noticed I was not passing databaseId, documentId to my try block.
[SOLVED] Unable to submit the cartItems to my Database collection.
Recommended threads
- Functions in cloud console not works
please advise as all of my runing functions on Appwrite console was working before , but now it give this error [Invalid `headers` param: Value must be a valid...
- Cannot migrate from Supabase
Hi, I was trying to migrate from Supabase to the Appwrite database. My database had around 190K columns. I tried it twice. Both times, after 2 days, the proce...
- Production down - createExecution return...
Hey, Since 1.9.6 rollout in fra (~17:00 UTC, 14 Aug), POST /v1/functions/{functionId}/executions returns a 400 whenever the body includes an empty headers ob...