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
- Function's Static IP
Is it possible to have static. IP Address instead of Dynamic IP for getting the IP Address whitelist
- How to use dart workspaces to deploy a f...
Hello, I'm developing a Flutter application and I would like to leverage dart pub workspaces to deploy a function with a dart runtime as advertised here : http...
- [SOLVED] Unable to push function from AP...
When trying to push functions from Gitlab CI (with an API KEY and using the CLI), i saw that i was unable to push functions. ``` $ appwrite client --endpoint $...