Im starting a function, and when I try to parse the req.body it just doesnt work
I attached some images of my code
For example if I log(bodyParsed.userId) is just undefined
Am i doing something wrong?
Perhaps it's already parsed so you don't need to parse it again
appwrite automatically parses the req.body?
I know the error seems very dumb, but it gets very strange...
When I delete node-appwrite from the dependencies on the package.json and comment the import { Client } from 'node-appwrite', out of nowhere everything works, I can extract the userId from the req.body and the log(bodyParsed) shows as a JSON
when the node-appwrite from the package.json and import { Client } from 'node-appwrite' is present in the code it is impossible to parse the req.body, It remains as a string and recently the entire function stopped working for no reason with an error of:
Multiple internal curl errors has occurred within the executor! Error Number: 111. Error Msg: Connection refused\nError Code: 500
What could cause it?
Im using "node-appwrite": "^9.0.0", i will attach a photo of my package.json, my code and the new error that appears in the console in case that helps...
how are you executing the function?
Do you mean where I am running it from? I am using the appwrite interface, I will attach an image
This is the exact same both times you executed?
I managed to solve the error, I tried many things and I no longer know which one worked
but now it works, thanks steven
[SOLVED] function req.body problem
Recommended threads
- No permissions provided for action 'read...
I have a very weird error; In a function I'm using dynamic keys to perform read write operation in rows. I have the scopes for read and write rows. The funct...
- Repository directory size should be less...
Whenever I create a function i get the error above. Is there a way to get around this? How do I fix this?
- "Waiting" executions
For my React Native App, I have had no issues deploying a function in Appwrite & the executions either working or failing. Now I am getting status code - 0 & j...