OsmanOriginal post
Rank 2: Process
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.
Plain text
await asyncFunc() } catch(err) { console.log(err) error(err) return res.empty() }```
Old fashioned console.log() logs the error just fine though.Summary
Title: [SOLVED] context.error not logging error content
Issue: When using context.error or context.log to log an error, it logs an empty object instead of the actual error content.
Solution: Use err.toString() instead of trying to stringify objects.
Code example:
```
try {
await asyncFunc()
}
catch(err) {
console.log(err)
error(err.toString())
return res.empty()
}
```
Using console.log() instead of context.error or context.log works fine.
