I like the concept of neverthrow. interesting talk about - https://youtu.be/VcOIz7tOBoM?si=DdxZlZkEX48t4YJi
- try catch is hidden control flow and
error
is unknown so it takes discipline to check everyinstanceof
and error could be, which is not scalable in larger teams. - neverthrow is useful when your service has multiple error states to handle
- catch should only be for truly exceptional circumstances which we cant control.