Back

Getting Server error when i create a new Document.

  • 0
  • Databases
  • Web
  • Storage
  • Cloud
Nikunj Panchal 🌿
27 Dec, 2023, 14:14

I hope you're doing well. I'm reaching out because I'm having trouble creating a new document through the Appwrite API, and I'm consistently getting a server error.

Server error 500

**Technology **

Html, css ,React Js

TL;DR
The user is experiencing a server error when trying to create a new document. The issue is not specified in detail with just "undefined" stated. No solution or further information is provided.
Guille
27 Dec, 2023, 14:37

are you using cloud or self hosting?

Drake
27 Dec, 2023, 17:30

Please provide the project id, code or request payload, and info about the collection

Nikunj Panchal 🌿
28 Dec, 2023, 07:31

ProjectId : 6586a26b0f284c8ab1ad Code : const newPost = await databases.createDocument( appwriteConfig.databaseId, appwriteConfig.postCollectionId, ID.unique(), { creator: post.userId, caption: post.caption, imageUrl: fileUrl, imageId: uploadedFile.$id, location: post.location, tags: tags, } );

Nikunj Panchal 🌿
28 Dec, 2023, 07:31

Collection Info

Drake
28 Dec, 2023, 07:42

Are you still getting this error?

Drake
28 Dec, 2023, 07:43

What tutorial are you following?

Drake
28 Dec, 2023, 07:43

Please share the attributes on the posts collection

Nikunj Panchal 🌿
28 Dec, 2023, 10:10

Yes,

Nikunj Panchal 🌿
28 Dec, 2023, 10:10
Drake
28 Dec, 2023, 20:24

these are all the attributes?

Drake
28 Dec, 2023, 20:36

what's the exact error now?

Nikunj Panchal 🌿
29 Dec, 2023, 06:10

yes

Nikunj Panchal 🌿
29 Dec, 2023, 06:10

same server error 500

Drake
31 Dec, 2023, 19:25

Would you please check the network tab if the browser dev tools and share the payload of the request?

Drake
31 Dec, 2023, 19:25

Also, make sure the user has the relevant permissions to all related collections

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more