Back

Getting error AppwriteException: Server Error while using query

  • 0
  • Databases
  • Web
  • Cloud
akashpatel
9 Mar, 2024, 01:48

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.

TL;DR
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.
Steven
9 Mar, 2024, 01:54

What version of the SDK are you using?

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