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
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...