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
- Local appwrite run functions --user-id n...
Hi, I'm running into an issue when testing Appwrite functions locally with user impersonation. I'm using a self-hosted Appwrite instance and running functions ...
- Function domain not available
Hello, even tho in docs you clearly describe that every function has its domain, I can not see it anywhere in any of my projects. How do I reveal the url of th...
- Inquiry: How to Reduce Cold Start Durati...
Hey! I was using Python for the function runtime, but after reading that Go has the fastest runtime, I switched my code over to Go. However, I'm still seeing co...