
Hey, my node JS app randomly crash with the following error
TypeScript
/root/AdFront/backend/node_modules/node-appwrite/lib/client.js:204
throw new AppwriteException(text, response.status, "", text);
^
AppwriteException [Error]: error code: 520
at Client.call (/root/AdFront/backend/node_modules/node-appwrite/lib/client.js:204:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Databases.listDocuments (/root/AdFront/backend/node_modules/node-appwrite/lib/services/databases.js:1658:16)
at async Timeout.UpdateImg [as _onTimeout] (/root/AdFront/backend/index.js:126:18) {
code: 520,
type: '',
response: 'error code: 520'
}
Node.js v21.6.1
I'm confused as this is the first time I see this error and the documentation dont mention it, and it seems to crash after a certain amount of time
Here's the line 126 of the code
TypeScript
const response = await databases.listDocuments("ads_db", "ads_list", [Query.equal('index', currentIndex)]);
Cheers
TL;DR
Error 520 is related to Cloudflare, not Appwrite. It's likely a network issue. The App randomly crashes after some time. Make sure Cloudflare settings are configured correctly.
Are you using Cloudflare? seems like error 520
has something to do with them.
Appwrite itself doesn't produce error 520
Recommended threads
- I have troubles with login to appwrite c...
errors occured in migration
- New Provider isn't working | Invalid OAu...
Hallo, I set up a new provider in Appwrite. I followed all the documentation, I set up everything, I successfully ran both Appwrite console and backend, and I f...
- Appwrite Sites: Error At Deployment
Hello, I am using Appwrite 1.7.4 on a self-hosted instance and am experiencing an issue with Appwrite Site's manual deployment. ```powershell [12:44:43] [open-...
