Skip to content

Conversation

@tranjennie
Copy link

No description provided.

lib/ApiHelper.js Outdated
credentials = data.credentials;
this.cred.sessionId = credentials.sessionId;
}).catch(err => {
throw err;
Copy link
Contributor

Choose a reason for hiding this comment

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

@tranjennie What issue does catching and re-throwing the err fix? We should add a unit test to cover this senario if possible.

Copy link
Author

Choose a reason for hiding this comment

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

@beefo I've removed this code. After some testing, I see that this was not catching any errors

Copy link
Contributor

Choose a reason for hiding this comment

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

@tranjennie there are a bunch more of the same catch and re-thow paterns added.

 .catch(err => {
                    throw err;
                });

If the one above didn't do anything, I assume the other don't do anything?
If we remove all of these, there's no change here as far as I can tell. What precisely are we fixing here?

Copy link
Contributor

Choose a reason for hiding this comment

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

If there is a legitimate fix here, please add a unit test for it.

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