Re:Modern Node.js Patterns
by upcoming-sesame on Sunday August 03, 2025 @07:29PM
(#44780723)
Cool didn't know about this
Re:Modern Node.js Patterns
by seniorsassycat on Monday August 04, 2025 @02:17AM
(#44782587)
It's wild that that's not what the section is about. Extending error is not new at-all.
Most people (including the author apparently) don't know they can chain errors with cause option in-built way in node and in browser. It is not just arbitrary extending and it is relatively a new thing. https://nodejs.org/api/errors.html#errorcause
Re:Modern Node.js Patterns
by seniorsassycat on Sunday August 10, 2025 @11:24PM
(#44860537)
I've found that a lot of logging frameworks and patterns will not include cause which can absolutely fuck debugging
new Error("something bad happened", {cause:innerException})