Back

Appwrite cloud functions: req data not displayed in log

  • 0
  • Functions
Pondia
28 Sep, 2024, 16:47

Hello guys,

I'm using the appwrite cloud.

By executing a GET query on my endpoint: http://aaaaaaaa.appwrite.global/ With the following json body:

TypeScript
{
    "hello": "world"
}

And with the following implementation

TypeScript
export default async ({ req, res, log }) => {
    log(req.bodyText);
    return res.json({ message: "OK" });
};

I'm expecting to see my body in the Logs section of my Executions panel according to the documentation. But here nothing is displayed. Why ?

I also notice that doing log(req) turns into a error 500.

Thanks for help!

TL;DR
Issue with req data not showing in log for Appwrite cloud functions. GET query on endpoint with JSON body not displaying in Logs section as expected. Error 500 when using log(req). Solution: check console for errors, ensure correct implementation of req.bodyText and log statements.
Pondia
28 Sep, 2024, 16:52

Appwrite cloud functions: req data not displayed in log

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more