I am using express.js on node.js. I have used seneca microservices after promisifying them using bluebird hence making a promise chains with all my service calls.
Now, in the catch() block of my promise chain in case of an error an error object is passed which on console.error(err) prints:
[ReferenceError: number is not defined]
What kind of object is this?
console.error(JSON.stringify(err)); prints:
{}
console.log(err instanceof Array); prints:
false
console.log(Object.keys(err)); prints:
[]
console.log(typeof err); prints:
object
Also, how do I differentiate it from an empty {}?