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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work? When there is an exception, won't
packageEntryFailure
be called twice after this change? And if there isn't an exception, isn't it the same to place the function at the end of the try block or after it 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packageEntryFailure
is essentially athrow new Error()
.So the previous behavior is:
packageEntryFailure(id)
is called in L834catch
in L835packageEntryFailure(id, e)
is called in L836try
blockcatch
in L835packageEntryFailure(id, e)
is called in L836the PR behavior is:
packageEntryFailure(id)
is called in L837There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! I overlooked the throw error as a log only inside that function. Edit: I overlook the throw twice 😅, double thanks!