Rank 1: Thread
I am trying to make a post request from postman to my function https://fra.cloud.appwrite.io/v1/functions/functionid/executions on the same body when i put from the appwrite dashboard sucess and when trying same request from postman i get
Native logs detected. Use context.log() or context.error() for better experience.
Failed to parse request body as JSON: SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Module.default (file:///usr/local/server/src/function/src/main.js:112:21)
at execute (/usr/local/server/src/server.js:220:42)
at action (/usr/local/server/src/server.js:237:27)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async /usr/local/server/src/server.js:26:5
This is from appwrite logs for the execution with status code 400
Cannot parse what i am doing is
Const data = JSON.parse(req.body) in a try and catch block
I trying changing it to req.payload but the same problem , what i am doing wrong ??