PingGhost
a small listDocuments in function keeps failing with 500
TypeScript
at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:174:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Databases.listDocuments (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/databases.js:1638:16)
at async Module.default (file:///usr/local/server/src/function/src/main.js:14:24)
at async execute (/usr/local/server/src/server.js:141:22)
at async /usr/local/server/src/server.js:158:13```
the code
```const candidates = await databases.listDocuments(
process.env.DATABASE_ID,
process.env.CANDIDATE_COLLECTION_ID,
[
Query.select(['date', 'university', 'videos', 'regions', 'user_id', 'profile_image', 'status']),
Query.equal('status', 'accepted'),
Query.limit(PAGE_SIZE),
Query.offset(req.query.page * PAGE_SIZE)
]
);
log('Preparation list for '+ candidates.total)```
**note that dashboard showing random 500**
TL;DR
User is experiencing an issue with a small listDocuments function, which keeps failing with a 500 error. They are querying on relationship attributes and using the Appwrite cloud. User wants to know if others have experienced similar issues and if there is a solution.
Solution: The error seems to be related to a server error. One possible solution is to check if the code is correctly querying on the relationship attributes and ensure that the database and collection IDs are correct. It might also be helpful to contact Appwrite customer support for further assistance. Drake
do you have relationships on this collection?
Drake
is this on Appwrite cloud?
PingGhost
it's on cloud yeap, there is a relation yeap
Drake
are you querying on any of the relationship attributes?
Recommended threads
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...