Hello. I'm getting error below when trying to create a new document. I don't remember creating attribute "author", but it fits in the context of what I am doing. So it's possible that I added and then removed this attribute. Either way, it shouldn't exist by now, it doesn't show up in console as well. I attached the screenshots of console, error & my code.
TypeScript
Error: Invalid document structure: Missing required attribute "author"
My code:
TypeScript
await databases.createDocument("bible-assistant-db", "jwchat-threads", ID.unique(), {
chatName: message,
messages: [{
role: "USER",
content: [
{
type: "TEXT",
text: message,
},
...images.map((image: any) => {
return {
type: "IMAGE",
media_type: image.media_type,
data: image.data,
};
})
],
}],
isBusy: true
}, [Permission.read(Role.user(user.$id))]);
TL;DR
Developers are receiving an error about a non-existent attribute "author" when trying to create a new document. Although the attribute isn't in the code or console, it may have been added and removed. The error persists.Recommended threads
- Getting error when trying to add domain ...
we use self hosted appwrite on my company and every single time ever I tried to add a domain it shows this error on the top rigth: "Cannot read properties of un...
- Using OTP Email to verify user for passw...
Has anyone ever implemented this? If you did what was your aproach? Did you write an appwrite function?
- Setup Permissions to only allow resource...
I would like to know how you do this in Appwrite Databases. Any ideas?