I found this very informative. I found myself thinking about returning errors instead of throwing them to ensure they are accounted for (in the context of a simple rest api with controller/service pattern). I thought it would be nice if you could instead throw errors and have a function type signature that reflects that. I don't come from Java but understand this is a feature there.
The tl;dr is: Javascript wasn't built for this. [Insert snarky comment about that not stopping developers before]
The tl;dr is: Javascript wasn't built for this. [Insert snarky comment about that not stopping developers before]