
Hey guys, I'm new here so please feel free to beat me up for being dumb. I am running a function using Node.js and keep getting the error below. I am trying to troubleshoot it, but I can't get any console.logs or console.errors to actually print out. Maybe I am looking for them in the wrong place? Maybe getting written natively and not to appwrite logs? Help!
TypeError: Cannot read properties of undefined (reading 'res') at module.exports (/usr/local/server/src/function/src/main.js:73:20) at execute (/usr/local/server/src/server.js:210:22) at action (/usr/local/server/src/server.js:225:27) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async /usr/local/server/src/server.js:14:5

For context, I am expecting a pre-build json payload from my front-end which I am passing to openAI api for image analysis, have no idea where it's blowing up... How do most people debug functions? Is there a way to do it locally or something?
Recommended threads
- Stuck at pinging the server to finish ad...
I'm not using the starter app and I'm not sure how to finish connecting my app to Appwrite.io. Is there a CURL command I can run to finish setup?
- 500 internal error
I get a 500 internal error when trying to access my database on appwrite cloud. Sometimes it would start working but this time it never corrects.
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
