Handle failed promises with better messaging - #43
Conversation
Record args in case promise fails
Throw failure if promise failed
|
So this is simply meant to be better logging Effectively, today if a promise returns a null, the whole thing blows up without clear messaging about what failed ( This change makes it so that when a promise returns a null value, instead of blowing up in In other words, it fails both before & after this change, but after this change it fails with a more helpful message vs Additional test: I'm not too famliar with nodejs, mostly just hobbled this together by copy-pasting; there doesn't seem to be any tests for the failure cases, only the happy cases - shouldn't there already be some tests that cover this? 😅 Would happily modify it as that's more straightforward |
Include function name for easier debugging
|
Gentle ping - reminder that this simply improves the error message from a null-access |
If a promise fails & returns a null value, fail with some additional info