message: "Server Error", code: 500, type: "general_unknown", version: "0.10.37"} code : 500message
- 0
- Databases
- Web
HI, I was creating the new entry for the database in nextjs with databases.createDocument and getting this error when I was adding.
Code Reference
export const createIdea = async (idea: string, type: string, createdBy: string) => {
const { databases } = useAppwrite();
try {
const { $id } = await databases.createDocument(
DATABASE_ID, IDEAS_COLLECTION_ID, ID.unique(), {
idea,
type,
createdBy,
}
);
// create the user interaction for the user who created the idea
await createUserInteraction(createdBy, "created", $id);
return $id;
} catch (error) {
console.log(error);
}
}
Probably related to this https://discord.com/channels/564160730845151244/1102936099745177700/1117863004097228880
Thank you.
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...