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.
Error: Invalid document structure: Missing required attribute "author"
My code:
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))]);
Recommended threads
- Transaction Error
AppwriteException: Transaction with the requested ID could not be found. at Generator.next (<anonymous>) { code: 404, type: 'transaction_not_found', r...
- Can not get the logged in user data in N...
I'm trying to get the user data after i log in with otp but it get this error : AppwriteException: User (role: guests) missing scopes (["account"]) at Gen...
- Sites Runtimes 1.8.0 Self-Hosting. Flutt...
I have a problem with the Flutter version for SITES RUNTIMES. I use self-hosting and updated to version 1.8.0, which according to the changelog says they updat...