akashpatelOriginal post
Web Developer
try {
const userAccount = await database.listDocuments(
process.env.HMSDB,
process.env.HMSCOLLECTION,
[Query.equal('userId', id)]
);
return userAccount;
} catch (error) {
console.log('error', error);
throw error;
}
i am getting "error AppwriteException: Server Error" when i tried to use query. I also created the index with name userId, please some help me.
Summary
Developers are encountering a "Server Error" when using a query with the Appwrite SDK. Make sure to check the version of the SDK being used and confirm that the 'userId' index has been created.