Back

Event triggered cloud function fails with 500

  • 0
  • Functions
  • Cloud
neutrino2211
3 Jan, 2025, 20:44

I have a cloud function called onWaitlist which listens for changes on a database collection but each execution fails with the following error.

TypeScript
Internal curl error has occurred within the executor! Error Number: 52\\nError Code: 500

The function directory contains an index.js file which exports a default function.

TypeScript
export default async ({req, res, log}) => {
  log("executing", req.bodyJson)
  const {$id} = req.bodyJson;
  //...

But nothing is logged and the function always fails. Any ideas why?

TL;DR
Cloud function 'onWaitlist' fails with 500 error due to internal curl error. The index.js function is not logging anything and always fails. Possible solution: Check for any potential CORS issues or firewall restrictions, ensure proper configuration of the cloud function environment variables.
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