Obviously, we usually log errors to the console like:
console.error(error)
Problem is, this doesn't always show you all the properties of an error.
If you want to see those properties, use something like:
console.log(JSON.stringify(error, Object.getOwnPropertyNames(error), 2))
This seems to only log properties at the top-level.
For other caveats and solutions, see: https://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify