When I tested your else_throw helper with a promise rejection, it returned and error object instead of throwing, which was the reason for my response. Unless I didn't test properly.
If it throws as expected then your approach will be a great alternative.
Your approach is also good.
I understand your intention from this response.
When I tested your
else_throw
helper with a promise rejection, it returned and error object instead of throwing, which was the reason for my response. Unless I didn't test properly.If it throws as expected then your approach will be a great alternative.
I must have forgotten to have it throw from the
.catch()
callback. I intended for it to throw.Yeah. That should be it.