Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust wrapSubscription to handle invalid errors #6

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

hwillson
Copy link

In some cases the subscriptionProto.error function override defined in wrapSubscription can receive a falsey err parameter. When this happens an exception is thrown since the error function override isn't being very defensive. The changes in this commit skip error handling if the passed in error is invalid.

I also replaced the deprecated calls to Meteor.uuid with uuid calls from the uuid npm package. This helped resolved most of the test failures. A few test failures remain (~4), but they're timing errors (some runs pass, some runs fail) so I left them as is.

Original issue: meteorhacks#247

hwillson added 3 commits July 19, 2018 07:34
In some cases the `subscriptionProto.error` function override
defined in `wrapSubscription` can receive a falsey `err`
parameter. When this happens an exception is thrown since
the error function override isn't being very defensive. The
changes in this commit skip error handling if the passed in
error is invalid.

Original issue: meteorhacks#247
@hwillson hwillson requested a review from abernix July 19, 2018 12:59
Copy link

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hwillson hwillson merged commit 5a780b3 into master Jul 24, 2018
@hwillson hwillson deleted the hwillson/issue-247 branch July 24, 2018 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants