When i execute the following code(NodeJS runtime), using the context.error or context.log functions to log the error, it logs an empty object instead of the actual error.
await asyncFunc()
}
catch(err) {
console.log(err)
error(err)
return res.empty()
}```
Old fashioned console.log() logs the error just fine though.
Open Runtimes tries to stringify objects but that doesn't work on errors. You should do err.toString()
instead.
Thanks <:appwritefire:823999000330895380>
[SOLVED]context.error does not log the error content
Recommended threads
- HTTP POST to function returning "No Appw...
Hi everyone, I’m running into an issue with my self-hosted Appwrite instance. I’ve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...
- How to verify an user using AppWrite Fun...
I have seen similar questions but none whose solutions serve me. I have a function to verify a user with their secret and their id: https://blahblah.appwrite.gl...