Web Developer
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)