I'm having trouble understanding how to use the async: true flag in the createExecution function. Do I need to create some sort of queue system? I can't find any examples of how to do this for Cloud + Web (Node.js)
When I try to run the following function multiple times without async: true It's only running the first one. If I add async: true I get a server error: Error: Function execution failed with status 0:
try {
const execution = await functions.createExecution(
"6667045d000c65a2ddcb",
id,
true
)
if (
execution.responseStatusCode >= 200 &&
execution.responseStatusCode < 300
) {
return JSON.parse(execution.responseBody)
} else {
throw new Error(
`Function execution failed with status ${execution.responseStatusCode}: ${execution.responseBody}`
)
}
} catch (error) {
console.error("Error fetching payment from server: ", error)
throw error
}
}
After playing around with some polling, I'm now getting an empty responseBody which might be tied to this issue: https://github.com/appwrite/appwrite/issues/6256
I guess I need to completely rethink they way I'm doing this
Recommended threads
- createMembership is not sending email wi...
Parameters should be correct. Account and Membership are successfully created. I have a next.js project with localhost origin allowed. I checked spam etc. i...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...
- Oauth issue
Hi, can anyone help me in the Oauth issue, Its working fine in dev but its showing Invalid redirect during production. I have check the redirect url and all. St...