fix(cli): Remove broken error handling #47
Merged
+1
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
data.state is not available when using Q.all() and only works with Q.allSettled().
As Q.all() is now used it does not make sense to do this check as the Promise
will be rejected immediately with an error if one of the calls to github fails.
This is broken since 7c1e4d9
Although I'm not super sure about this fix as I think the referenced commit might have broken more stuff, as Q.all() is not waiting for all promises to be fulfilled and instead cancels everything as soon as one fails, leaving the user in an undefined state which requests actually were send and which ones were canceled.
In contrast Q.allSettled() waits till everything is finished and you have to handle failures yourself with the
state
property.Also the commit message of the change says that the user did not noticed that something failed which is wrong, as the
state
check was in place I guess. And it says it fixes #3 which seems unrelated.So my ultimate solution would be to revert the commit in question but you need to decide :)
Fixes #46
https://github.com/kriskowal/q#combination