Back

Invalid response. This usually means too large logs or errors. Please avoid logging files or lengthy

  • 0
  • Self Hosted
elnur
5 Jun, 2024, 10:29

Per title: Invalid response. This usually means too large logs or errors. Please avoid logging files or lengthy strings.\nError Code: 500

I very much need to know what the req object from the function consists of.

code:

TypeScript
// This is your Appwrite function
// It's executed each time we get a request
export default async ({ req, res, log, error }) => {

log(`Req: ${JSON.stringify(req)}`) // yields above error...
TL;DR
Developers are encountering an "invalid response" error related to logging large files or lengthy strings. They are seeking information about the contents of the req object in their Appwrite function. The request object is said to be printable and not excessively large unless dealing with big body data or headers. The error code received is 500. Solution: In this case, the log statement attempting to stringify the req object may be causing the issue. To view the contents of the req object without errors, developers can modify the log statement to selectively log the necessary information from the req object.
darShan
5 Jun, 2024, 10:59

unless you are sending a very big body data or headers, the request object afaik is pretty much printable and not that big.

also here's a basic idea of the contents - https://appwrite.io/docs/products/functions/develop#request

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