I\'m running into an issue when trying to pass error messages around using web sockets. I can replicate the issue I am facing using J
J
You can also just redefine those non-enumerable properties to be enumerable.
Object.defineProperty(Error.prototype, 'message', { configurable: true, enumerable: true });
and maybe stack property too.
stack