m0hsin_Original post
Web Developer
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
Summary
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`