π Bug Report: Node App terminates if appwrite server is offline
Capsicum42 opened this issue Β· comments
Holger commented
π Reproduction steps
I tried the following in my node app
try {
const _response = databases.createDocument(
process.env.APPWRITE_DATABASE_ID,
process.env.APPWRITE_COLLECTION_ID,
uuidv4(),
{
query: query as string,
userId: auth0UserId as string,
},
)
} catch (e) {
console.log(e)
}
It works as expected.
π Expected behavior
When the appwrite server is not available I expect, that my node server continue running and displays the error in the console.
π Actual Behavior
My node server stops working with:
[2023-05-11T12:44:36.447Z] Error:
at Client.call (/Users/holger/Documents/GitHub/pzh-server/node_modules/node-appwrite/lib/client.js:170:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Databases.createDocument (/Users/holger/Documents/GitHub/pzh-server/node_modules/node-appwrite/lib/services/databases.js:1666:16)
[ERROR] 14:44:36 Error
"node-appwrite": "^9.0.0",
π² Appwrite version
Version 0.10.x
π» Operating system
Linux
𧱠Your Environment
No response
π Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Holger commented
My fault. I forgot the await.