I'm trying to convert object to string using JSON.stringify and I get empty object
console.log('typeof',typeof e,' e value is',e, 'JSON stringify is',JSON.stringify(e))
the error message when I try to print
typeof object e value is Error: Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred. JSON stringify is {}

console.logis variadic — you can pass multiple objects, which are separated by a,.eis an error object. In node, stringifying an error results in{}. Not sure how you are running your code.