I am getting this error while creating document in appwrite databse
const res= await databases.createDocument(
'6694241300092f029d7d',
'6694241d003574e82d23',
ID.unique(),
{body:"tasksss"}
);
TL;DR
Issue: Error message "Invalid document structure: Unknown attribute: "body"
Solution: Create an attribute called 'body' for the mentioned collection in the appwrite database as it seems the 'body' attribute is missing causing the error during document creation.
Souptik Datta
18 Jul, 2024, 15:49
@vimaltomar231 You must not have created body attribute for this collection, that's why it is giving this error.
Souptik Datta
18 Jul, 2024, 15:50
For your reference, create an attribute like this called body for your collection.