Error message:
An internal curl error has occurred within the executor! Error Msg: Operation timed out\nError Code: 500
Appwrite cloud
Entry point: node index.js
Execute Access: Any
I just deployed the example for node18.0 via github repository `const fetch = require("node-fetch");
module.exports = async (context) => { const payload = context.req.body;
const todo = await fetch(`https://jsonplaceholder.typicode.com/todos/${payload.id ?? 1}`).then(r => r.json());
return context.res.json({
message: 'Hello Open Runtimes 👋',
todo
});
}`
According to the logs the build succeeded
And ran
curl -H "X-Open-Runtimes-Secret: secret-key" -H "Content-Type: application/json" -X POST https://<function>.appwrite.global/ -d '{"payload": "{2}"}'
Locally it's working !!!
What I'm missing here (It's my first time I'm using function in appwrite)
Getting 500 error when trigger cloud function
Found the issue, it should be only index.js and not node index.js
[SOLVED] Getting 500 error when trigger cloud function
Recommended threads
- Worker functions stuck on "Fetched 0 fun...
Appwrite Version: 1.9.0 Bug Description: The appwrite-worker-functions container gets stuck in an infinite loop logging "Fetched 0 functions..." while scheduled...
- I am using s3 for app storage but is it ...
_APP_STORAGE_DEVICE=s3 puts everything to the s3 storage but i need to be able to keep the function builds and site in the local and not waste the cloud storage...
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...