Re:It's probably time to stop recommending Clean Code (2020)
by Merad on Tuesday May 25, 2021 @12:57PM
(#27279301)
Good grief, that pattern looks like it's effectively building a stack trace by hand. Does node not provide stack traces with errors?
When I get the error in the console/browser, the path to the error is included for me like "[generatePasswordResetToken.setTokenOnUser] Must pass value to $set to perform an update."
With that, I know exactly where the error is ocurring and can jump straight into debugging it.