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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...