Skip to content

Conversation

realyze
Copy link

@realyze realyze commented Sep 26, 2014

It might be better to relax the statusCode checks a bit (i.e., consider things to be OK if statusCode is in the 2xx family).

}

if (response.statusCode !== 200) {
if (response.statusCode / 100 | 0 != 2) {

Choose a reason for hiding this comment

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

This check is made in two places. Could you extract it to a helper function like is200ErrorCode?

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