Back
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
TypeScript
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);
}
}
TL;DR
The user encountered a server error with a code of 500 when trying to create a new entry in the database using `databases.createDocument` in Next.js. They provided a code reference for the function. No solution is mentioned.
Probably related to this https://discord.com/channels/564160730845151244/1102936099745177700/1117863004097228880

Thank you.
Recommended threads
- I am trying to run appwrite storage list...
Hello! I am trying to use a command to return all of my files from my bucket. This is the cmd I am currently running: "appwrite storage list-files --bucket-id <...
- nextjs site template gets 500 for /v1/pi...
whats the right way to configure this? do i need to deploy a function? im loosing my hair and i can't get a nextjs site to work. pls help
- WebSocket connection failed - Realtime g...
I am using appwrite cloud + angular (appwrite 21.2.1). On Chrome, when I have a realtime subscribtion and I reload the page or navigate to another page, realtim...
