If your Node.js version is < than 6.0.0

Using console.log(err) prints only the error message.

For newer version

It prints the error message and the full stack.