Back

500 internal server error when creating a new document

  • 0
  • Web
m0hsin_
31 Jan, 2024, 13:36

Hey all, I am new here.

I am getting an internal server error when creating a new document using the React client SDK. Below is the code that is throwing this error.

The wierd part is that this document is created successfully on the database and I can browse it from the console.

const response = await database.createDocument( process.env.REACT_APP_APPWRITE_DATABASE_ID, process.env.REACT_APP_APPWRITE_COMPANIES_COLLECTION_ID, ID.unique(), action.payload ); Env: Web client sdk Self-hosted Appium 1.4.9

TL;DR
Title: Internal server error when creating a new document with React client SDK Message: New developer here. I'm encountering a 500 internal server error when trying to create a new document using the React client SDK. The document is successfully created in the database, but the error persists. Any insights on how to resolve this? Solution: It seems to be an issue with the server configuration. You can try the following steps to troubleshoot: 1. Double-check the environment variables used in the `createDocument` function. Ensure that `REACT_APP_APPWRITE_DATABASE_ID` and `REACT_APP_APPWRITE_COMPANIES_COLLECTION_ID`
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