Skip to content

Commit

Permalink
Merge pull request #1 from mithoog/patch-1
Browse files Browse the repository at this point in the history
Update utils.js
  • Loading branch information
klarstil committed Dec 19, 2016
2 parents 7205490 + 1a14a7b commit a8f4b19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module.exports = {
});

// Special case HTTP code 422 Unprocessable Entity
if (response.statusCode === 422) {
// BUG FIXED: response is undefined some times, so added check if response object is available
if (response && response.statusCode === 422) {
error = body.error;
}

Expand Down Expand Up @@ -66,4 +67,4 @@ module.exports = {

return isValid;
}
};
};

0 comments on commit a8f4b19

Please sign in to comment.